DOTENV Intro - Creating Environment Variables

Опубликовано: 12 Май 2026
на канале: Learn, Think & (Create) Code
42
0

In this video, I have explained about a npm package called DOTENV which helps us to create environment variables.

DOTENV

1. Storing configuration in the environment separate from code.
2. Separating configurations makes it easier for our application to be deployed in different environments.
3. Prevents exposing the configuration data like,
 HTTP port.
 Database connection string.
 Location of static files.
 Endpoints of external services.

PROCESS.ENV
1. The process.env global variable is injected by the Node at runtime for your application to use.
2. It represents the state of the system environment your application is in when it starts.