- Platform
- Environment
Environment
Lade environment variables are supported for your applications. They allow you to run the same code in different environments as defined in the twelve-factor app. Your environment variables are encrypted in transit and at rest, making them the preferred way to store credentials.
Managing Environment Variables
You can create a Lade environment variable with the CLI:
$ lade env set ALLOWED_HOSTS=www.example.com --app myapp
You can remove your Lade environment variable with the CLI:
$ lade env unset ALLOWED_HOSTS --app myapp
Accessing Environment Variables
You can access the value of the PORT
environment variable from your app using the following examples:
Go
os.Getenv("PORT")
Node.js
process.env.PORT
PHP
$_ENV["PORT"]
Python
os.getenv("PORT")
Ruby
ENV["PORT"]