I'm currently running a node application on an EC2 Instance Linux using PM2 to manage and it keeps crashing, throwing an error that reads Username is required.
This username is being fed from process.env.USERNAME that I set using dotenv for development.
So far using AWS shell I have tried to pass the env variable in the following paths:
/etc/profile
/etc/bashrc
/etc/profile.d
~/.bash_profile
~/.bashrc
The variables were put in this form: export VARIABLE_KEY=VALUE
I also tried to put the variables inside /etc/environment. None of which is making it work.
I restarted the server each time, logged out, and logged back in.