Is there a way to read environment variables in Node.js code?
Like for example Python\'s os.environ[\'HOME\']
.
You can use env package to manage your environment variables per project:
.env
file under the project directory and put all of your
variables there.require('dotenv').config();
Done. Now you can access your environment variables with process.env.ENV_NAME
.