myProxy
myProxy copied to clipboard
Not picking up env variable
Describe the bug
When I've setup an env variable for ADMIN in ~/.bashrc as root, then source ~/.bashrc, I verified that my env ADMIN variable exists by typing echo $ADMIN. But when I run npm run server, I get the error that says, 'please set ADMIN env variable`.
To Reproduce Steps to reproduce the behavior:
- Get fresh server from digital ocean.
vim ~/.bashrc- Add
ADMIN=.... - Load your env variables by doing
source ~/.bashrc - Install myproxy, run server without
ADMINenv variable. You will get error.
Expected behavior I expect the environment variable to get picked up. and not throw the error.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Because the app runs with pm2, I guess pm2 doesn't read environment variables you may have sourced in the current shell session. Not sure though.