Vapor v0.3.0 Vapor.Provider.Dotenv View Source
The dotenv config provider will look for a .env
file and load all of
the values for that file. The values can be written like so:
DATABASE_URL=https://localhost:9432
PORT=4000
REDIS_HOST=1234
If the file can't be found then this provider will still return an ok but will (obviously) not load any configuration values. The primary use case for this provider is local development where it might be inconvenient to add all of the necessary environment variables on your local machine and it makes tradeoffs for that use case.