I am looking at the getting-started section of node. According to the tutorial the value of process.env.NODE_ENV is set to development by default but i get undefined when i run console.log(process.env.NODE_ENV);. What am i missing here?
Hi @Sky020. I do know about the dotenv package and how to use it to conceal sensitive information like database key. However i am trying to understand the process module and this getting-started tutorial states:
The process core module of Node.js provides the env property which hosts all the environment variables that were set at the moment the process was started.
Here is an example that accesses the NODE_ENV environment variable, which is set to development by default.
I assume from the last statement that NODE_ENV is some kind of builtin environment variable set to development all the time. Am i misunderstanding something here?