I would like to avoid having secrets hard coded into my Node.JS application like this:
app.use(cookieParser('SECRETSECRETSECRET1!!!'));
How can I secrets in Node.JS?
CodePudding user response:
Keep them in your .env
file.
Then you can use packages like dotenv to load them into your js code