patternjavascriptCritical
Read environment variables in Node.js
Viewed 0 times
environmentvariablesreadnode
Problem
Is there a way to read environment variables in Node.js code?
Like for example Python's
Like for example Python's
os.environ['HOME'].Solution
process.env.ENV_VARIABLEWhere
ENV_VARIABLE is the name of the variable you wish to access.See Node.js docs for
process.env.Code Snippets
process.env.ENV_VARIABLEContext
Stack Overflow Q#4870328, score: 2207
Revisions (0)
No revisions yet.