Questions tagged [dotenv]

This tag is for questions about the Dotenv Node.js module. For PHP, see the `phpdotenv` tag; for ruby, see the `ruby-dotenv` tag.

Dotenv is a zero-dependency Node.js module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology.

Find NPM package here for documentaion.

Other language implementations

821 questions
0
votes
2 answers

How to add an variable in .env file which contain #?

I want to define KEY=qwerty#1234 in .env file in create-react-app but it ignores everything after #. I have tried KEY="qwerty#1234" but it did not work. So, How can I assign this? Actual variable in .env file:…
Kishor
  • 502
  • 1
  • 5
  • 12
0
votes
2 answers

teradatasql Python module only works when scripting but not when running code

I have run into a peculiar issue while using the teradatasql package (installed from pypi). I use the following code (let's call it pytera.py) to query a database: from dotenv import load_dotenv import pandas as pd import teradatasql # Load the…
ymzkala
  • 323
  • 3
  • 7
0
votes
1 answer

My environment variable comes up undefined

I'm not sure why my environment variable comes up undefined. This is the first time I am using environment variables and can not seem to figure out what the issue is, My environment file is something like this: # ANSIBLE MANAGED FILE, YOUR CHANGES…
coder123
  • 841
  • 1
  • 7
  • 19
0
votes
1 answer

Flask is not able to read my environment variable

I want to automatically import my FLASK_APP environment variable when running the Windows cmd. I installed the python-dotenv, then created an .env file under my project main path. However, I kept getting errors saying " Could not locate Flask…
0
votes
1 answer

.env process.env isn't working with DocuSign docusignAPI using node.js example

I'm using the example from docusign at https://github.com/docusign/qs-02-node-send-envelope , and have configured the index.js file the ACCESS_TOKEN, ACCOUNT_ID, USER_FULLNAME and USER_EMAIL it worked fine. But when I configure the .env file it…
Jony
  • 157
  • 1
  • 11
0
votes
1 answer

How can I test the dotenv package to ensure it is hiding sensitive data?

The dotenv package is used in Node.js apps to hide sensitive data from the outside world. Deploying it is simple enough, npm install dotenv Setting up a custom directory inside app.js to access a .env file is also…
0
votes
1 answer

Azure App Service (Windows) Config Variable

I'm having an issue reading env variables on Azure App Service Windows instance. I use dotenv nodejs package for storing my env variables in .env file. It works perfectly fine on my local machine (Windows 10), but the same does not when hosted on a…
Perumal Perumal
  • 67
  • 1
  • 10
0
votes
1 answer

Problem with .env file being read in javascript project

I am using a .env file to store API Key. However, I can't seem to get to get my base JavaScript file to read the .env file. I have installed the dotenv npm package but it does not appear to be working and I am not sure what is going on. I have made…
0
votes
0 answers

Can't read value of a .env file in TypeScipt code

I'm trying use .env to read the JWT secret and validate my tokens. My class at this moment is loading the .env and reading the value, after that I can create a token: export default class AuthMiddleware { constructor() { } private async…
Jean J. Michel
  • 561
  • 1
  • 7
  • 14
0
votes
0 answers

How do I access a dotenv variable in a html file?

I'm using NodeJS and Electron to make an app. As Electron uses HTML, I need a