2018-07-12 13:15:49 -04:00
2018-07-12 13:15:49 -04:00
2015-06-16 12:43:48 -04:00
2018-07-12 13:15:49 -04:00
2015-05-15 14:56:12 -04:00
2015-05-13 19:18:25 -04:00
2015-07-19 17:16:46 -04:00
2016-02-21 13:51:10 -05:00
pub
2015-04-07 19:41:48 -04:00
2015-06-16 12:43:48 -04:00

dotenv

Load environment variables at runtime from a .env file.

Pub Version Build Status Documentation

about

Deploying applications should be simple. This implies constraints:

The twelve-factor app stores config in environment variables (often shortened to env vars or env). Env vars are easy to change between deploys without changing any code... they are a language- and OS-agnostic standard.

An environment is the set of variables known to a process (say, PATH, PORT, ...). It is desirable to mimic the production environment during development (testing, staging, ...) by reading these values from a file.

This library parses that file and merges its values with the built-in Platform.environment map.

usage

See documentation and examples.

cli

Get the latest:

$ pub global activate dotenv

Run:

$ pub global run dotenv:new  # create a .env file and add it to .gitignore
$ pub global run dotenv      # load the file and print the environment to stdout

discussion

Use the issue tracker for bug reports and feature requests.

Pull requests gleefully considered.

prior art
license: MIT
Description
Loads environment variables from .env.
Readme MIT 631 KiB
Languages
C++ 33.4%
Dart 31.6%
CMake 27.3%
Swift 2.4%
C 2%
Other 3.3%