Skip to content
Loads ".env" files
Crystal
Branch: master
Clone or download
gdotdesign Merge pull request #17 from j8r/use-dedicated-parser
Use dedicated parser to parse each dotenv line
Latest commit 3c24256 Sep 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
spec Use dedicated parser to parse each dotenv line Sep 12, 2019
src Use dedicated parser to parse each dotenv line Sep 12, 2019
.gitignore Initial commit. Jul 11, 2016
.travis.yml Update .travis.yml. Jul 11, 2016
LICENSE Initial commit. Jul 11, 2016
README.md Use dedicated parser to parse each dotenv line Sep 12, 2019
shard.yml Bump version to 0.3.1 Sep 12, 2019

README.md

Dotenv

Build Status

Loads .env file.

Installation

Add this to your application's shard.yml:

dependencies:
  dotenv:
    github: gdotdesign/cr-dotenv

Usage

Dotenv file example

# Comments can be included for context
#
MY_VARIABLE=my-value

# Empty Lines are also ignored
#
ANOTHER_VAR=awesome-value

Basic example

To load a file named .env-file:

require "dotenv"

# The default file is ".env"
Dotenv.load ".env-file"

See the API docs for more examples.

Contributing

  1. Fork it ( https://github.com/gdotdesign/cr-dotenv/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

You can’t perform that action at this time.