Questions tagged [environment-variables]

Environment variables are a set of dynamic named values that can affect the way running processes will behave on a computer.

Environment variables are a set of dynamic-named values that can affect the way running processes will behave on a computer. They can be said in some sense to create the operating environment in which a process runs. For example, an environment variable with a standard name can store the location that a particular computer system uses to store temporary files—this may vary from one computer system to another. A process which invokes the environment variable by (standard) name can be sure that it is storing temporary information in a directory that exists and is expected to have sufficient space.

https://en.wikipedia.org/wiki/Environment_variable

13704 questions
6
votes
1 answer

Azure App Service - ASPNETCORE_ENVIRONMENT - Multiple Values Issue

I am having a slight (though, not impacting functionality) issue with Azure App Service and the ASPNETCORE_ENVIRONMENT. On my local development environment I used the command setx ASPNETCORE_ENVIRONMENT "Development" to set my local to Development.…
6
votes
1 answer

node / react after installing .env module, error for "fs"

I need to read some environmental variables on my node/react project. After I installed dotenv npm install dotenv --save I import dotenv in my js file: require('dotenv').config(); then I get an error for "fs" Module not found: Error: Can't…
manuelBetancurt
  • 15,428
  • 33
  • 118
  • 216
6
votes
1 answer

"Error installing rails" because "extconf.rb failed" on Ubuntu 18.04

I'm failing to install Rails. Background: My (brand new) system = Ubuntu 18.04, Ruby 2.6.0, latest rvm and bundler installed and updated. The first thing I did after installing Ruby was to do sudo apt install ruby-railties and sudo apt install…
6
votes
2 answers

Can't access variable key inside .env (dotenv package React)

So I'm trying to understand how to use .env to secure my api key & data for my login auth. I've followed the process of the dotenv package and the stackoverflow answer here. What I did: 1. I installed the dotenv package 2. In my rootfolder, I…
Cédric Bloem
  • 1,447
  • 3
  • 16
  • 34
6
votes
3 answers

How to change a environmental variable (functions.config()) of a firebase function, without redeploying the function from the cli

I'm trying to use a functions.config() variable of the firebase functions environment, to be able to switch logs on/off depending on, whether this variable is set to true/false. I have already created it, but it seems based on info from the…
6
votes
3 answers

How to use win environment variable "pathlib" to save files?

I'm trying to use win environment variable like %userprofile%\desktop with pathlib to safe files in different users PC. But I'm not able to make it work, it keep saving in on the running script dir. import pathlib from datetime import datetime a =…
Max
  • 117
  • 2
  • 7
6
votes
1 answer

How to Create,set,Read and Delete environment variable using C# and VB.Net programming languages

I want to create a environment variables using C# and VB.Net code and able to Read,Delete and Set values to the new created variable. help me with code to do this process.
6
votes
1 answer

Setting separate values for environment variable in HELM for DEV, PRESTAGING, STAGING and PROD

I am currently using Helm charts for deployment. What I basically wanted to do is to set environment variables for different environments. Use-case: I am using Helm to deploy a Node JS application and based on the value of the environment variable…
Radioactive
  • 611
  • 1
  • 11
  • 20
6
votes
1 answer

How to deploy a different host.json for a different deployment profile?

I deploy my Azure Function from Visual Studio, and as part of my Functions project I have a host.json file which specifies some settings which I need to change for Production vs Development. (Specifically, the extensions:queues:batchSize setting). …
vargonian
  • 3,064
  • 3
  • 27
  • 36
6
votes
2 answers

Vue.js: Defining computed environment variables in vue.config.js (vue cli 3)

The documentation for Vue CLI 3 says here https://cli.vuejs.org/guide/mode-and-env.html#using-env-variables-in-client-side-code: You can have computed env vars in your vue.config.js file. They still need to be prefixed with VUE_APP_. This is useful…
lhermann
  • 490
  • 6
  • 11
6
votes
4 answers

How to make an environment variable different across two pods of the same deployment in kubernetes?

Based on this it is possible to create environment variables that are the same across all the pods of the deployment that you define. Is there a way to instruct Kubernetes deployment to create pods that have different environment variables? Use…
6
votes
1 answer

Why is bash using single and double quotes literally?

I have a situation in Bash I've never encountered before and don't know how to resolve. I installed bash on Alpine Linux (Docker Container) and for some reason environment variables with quotes translate literally. MY_PATH="/home/my/path" > cd…
qodeninja
  • 10,946
  • 30
  • 98
  • 152
6
votes
6 answers

WAMP Laravel - Sending API requests from one local site to another mixes up environment variables

I am developing an API service that another site I've developed will be using. So locally when building and testing, obviously I want both local copies of the site to work. However, it seems to mix up the environment variables. For example: Site A…
Giedrius
  • 1,370
  • 3
  • 14
  • 37
6
votes
2 answers

AWS JS SDK doesn't Loading Credentials from environment variables

I configured .env file to have AWS credentials, it doesn't work. in the docs, it is written the config will automatically be loaded from .env file. but it doesn't. I tried to add the following aws.config.update({ region:…
Allloush
  • 1,140
  • 8
  • 27
6
votes
1 answer

How to export multi line environment variable by shell script

I have a env.sh which contains: export MULTI_LINES="line1\nline2\nline3" Then I use source to run it source env.sh When I check the environment variable: printenv | grep MULTI_LINES it shows MULTI_LINES=line1\nline2\nline3 How to escape "\n"…
Tiancheng Liu
  • 782
  • 2
  • 9
  • 22
1 2 3
99
100