myProxy icon indicating copy to clipboard operation
myProxy copied to clipboard

Not picking up env variable

Open songz opened this issue 4 years ago • 1 comments

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:

  1. Get fresh server from digital ocean.
  2. vim ~/.bashrc
  3. Add ADMIN=....
  4. Load your env variables by doing source ~/.bashrc
  5. Install myproxy, run server without ADMIN env 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.

songz avatar Oct 19 '21 22:10 songz

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.

ggwadera avatar Oct 20 '21 11:10 ggwadera