Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gdotdesign/cr-dotenv
Loads ".env" files
https://github.com/gdotdesign/cr-dotenv
crystallang dotenv
Last synced: about 1 month ago
JSON representation
Loads ".env" files
- Host: GitHub
- URL: https://github.com/gdotdesign/cr-dotenv
- Owner: gdotdesign
- License: mit
- Created: 2016-07-11T10:40:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T07:55:42.000Z (over 3 years ago)
- Last Synced: 2024-10-25T01:25:36.007Z (about 2 months ago)
- Topics: crystallang, dotenv
- Language: Crystal
- Homepage:
- Size: 49.8 KB
- Stars: 95
- Watchers: 4
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - cr-dotenv - Loads .env file (Configuration)
- awesome-crystal - cr-dotenv - Loads .env file (Configuration)
- awesome-crystal - cr-dotenv - Loads .env file (Configuration)
README
# Dotenv
![Build Status](https://github.com/gdotdesign/cr-dotenv/workflows/CI/badge.svg)
Loads `.env` file.
## Installation
Add this to your application's `shard.yml`:
```yaml
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`:
```crystal
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
- [[gdotdesign]](https://github.com/[gdotdesign]) Gusztáv Szikszai - creator, maintainer
- [[bonyiii]](https://github.com/[bonyiii])
- [[kriskova]](https://github.com/kriskova)
- [[neovintage]](https://github.com/[neovintage]) Rimas Silkaitis
- [[rodrigopinto]](https://github.com/[rodrigopinto]) Rodrigo Pinto