.env files and read environment variables using dotenvy.
Functions
| Function | Description | Example |
|---|---|---|
env.load() | Load .env from current directory | env.load() |
env.load(path) | Load specific .env file | env.load(".env.production") |
env.get(key) | Get environment variable | env.get("API_KEY") |
Examples
Given a.env file:
Codes