Skip to main content

Providing Environment Variables

Different ways of providing Environment Variables

There are multiple ways how to provide Environment variables to your application.

1. Provide them natively based on your OS:

node MY_ENV_KEY=value dist/server

2. Provide them in kubernetes or whatever system you deploy too:

---
spec:
containers:
- env: [TEST_KEY=value]
---

3. Create a .env file in the root of your project:

-- Project Root
-- .env (your environment variables)
-- environment
-- src
-- package.json