Getting environment variables from nodejs app cpanel

Viewed 166

So I'm using cPanel with Setup Node.js App plugin for an node/express app. (don't asky why cPanel)

Everything is working as expected in development, except for environment variables in production, I set up them manually from the cPanel interface, I restarted/stopped the app, logging the process.env on the server and I don't see the env variables there (not to say when trying to call them they are undefined).

When doing res.json(JSON.stringify(process.env)); i get a bunch of variables except for the one I manually wrote in cPanel variables interface.

It is important for me to store these variables as a secret key because they are API credentials.

Does anyone know what I might have misconfigured or had this problem?

0 Answers
Related