I\'m new to the Node.JS. I found few articles says we can use .env file to setup the process.env variable, e.g.,
PORT = 8081
but when I run
Make a config.js file with the following content:
module.exports = { bar: 'someValue', foo: 'otherValue' ... }
Then you can do this in some file:
const config = require('./config'); let foo = config.foo;