Runtime environment variables
NodeJS scripts access environment variables through the global variable process.env
. To quote the NodeJS documentation:
The process core module of Node.js provides the
env
property which hosts all the environment variables that were set at the moment the process was started.
Tips
- Connection properties will be available on
process.env
without any further configuration or code from CodeNOW users. - Use deployment configuration files to add your own runtime variables.
- The NodeJS developer community commonly uses the
dotenv
npm package to manage runtime environment variables.