Skip to content

jgaskins/cr-dotenv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Loads ".env" files

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Crystal 100.0%