Environment
The environment the application is running in, i.e., production, dev, etc. All Container
s will have an Environment
that can be used to dynamically register and configure services.
struct Environment
switch env {
case .production:
app.http.server.configuration = ...
default: break
}
The Environment
can also be used to retrieve variables from the Process’ ENV.
print(Environment.get("DB_PASSWORD"))