You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
Archived: this project is no longer seeing updates. I (highly) recommend
you migrate to dotenv-hs, which has the same usage, the same features, and
much more.
This is effectively a port of dotenv, whose README explains it best:
Storing configuration in the environment is one of the tenets of a
twelve-factor app. Anything that is likely to change between deployment
environments–such as resource handles for databases or credentials for
external services–should be extracted from the code into environment
variables.
But it is not always practical to set environment variables on development
machines or continuous integration servers where multiple projects are run.
dotenv loads variables from a .env file into ENV when the environment is
bootstrapped.
This library exposes functions for doing just that.
Usage
importLoadEnvimportSystem.Environment (lookupEnv)
main::IO()
main =do
loadEnv
print=<< lookupEnv "FOO"