1

I had a problem for accessing environment variable using forever.

Thanks to this post, I have a workaround making env vrariable accessible but I'm still wondering why I have to add them all the time :

MY_VARIABLE=SOMETHING forever start my_script.js

because I've previously done an :

export MY_VARIABLE=SOMETHING

Then opened a new terminal but still no luck ...

I would like to set my variable once and not have to write it down each time I'm managing my script ...

Thanks for people who will take time to make me less an idiot and satisfy my curiosity ...

Community
  • 1
  • 1
hugsbrugs
  • 3,501
  • 2
  • 29
  • 36
  • Are you running `forever` from the root of the application? I've found that if I run it from a different directory, some things with environment variables don't work (like `dotenv` package). – R891 Apr 04 '18 at 21:27

1 Answers1

-2

export setting tightly on the current bash or session effectively.It exists in memory.