What is process.env?

process.env is an object exposed by Node.js that provides access to environment variables available to the running process. It is commonly used for configuration such as database URLs, ports, feature flags, and secrets. Sensitive values should be supplied securely rather than committed to source control.

Key Takeaways
  • process.env contains environment variables.
  • Use environment variables for runtime configuration.
  • Do not commit secrets into source code.
Knowledge Check

What is process.env commonly used for?