I use process.env
a little in my program, it seems this variable have nothing to do with my program, without it my app could work well, too.
So how can I fu
There is no documentation for the variables of process.env
since it based on your environment. (Surprise).
When an operation system (OS, Linux, Win, or other), starts a process it's passing it environment variables that the process can read.
using process.env
you can read the variables that passed to your programs by the OS.
Usually, NodeJS projects are using process.env
for two things:
console.log
on production.Pro tip: There is another way. To define things in .env
file. At this file to your .gitignore
, and use the npm module dotenv