Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Grubba27/gleam_dotenv
dotenv for gleam
https://github.com/Grubba27/gleam_dotenv
Last synced: 24 days ago
JSON representation
dotenv for gleam
- Host: GitHub
- URL: https://github.com/Grubba27/gleam_dotenv
- Owner: Grubba27
- License: mit
- Created: 2023-10-25T01:00:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-31T14:57:21.000Z (25 days ago)
- Last Synced: 2025-01-01T01:52:26.325Z (25 days ago)
- Language: Gleam
- Size: 24.4 KB
- Stars: 7
- Watchers: 1
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gleam - gleam_dotenv - [📚](https://hexdocs.pm/gleam_dotenv/) - dotenv for Gleam (Packages / Configuration)
README
# dotenv_gleam
[![Package Version](https://img.shields.io/hexpm/v/dotenv)](https://hex.pm/packages/dotenv_gleam)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/dotenv_gleam/)Similar to [Node](https://www.npmjs.com/package/dotenv) dotenv and [Ruby](https://github.com/bkeepers/dotenv) dotenv
## Installation
If available on Hex this package can be added to your Gleam project:
```sh
gleam add dotenv_gleam
```then in your code:
```gleam
import dotenv_gleam
import envoy // do not forget to add envoy to the projectpub fn main() {
dotenv_gleam.config() // this should load .env filelet assert Ok(test) = envoy.get("TEST")
let assert Ok(bar) = envoy.get("BAR")
}// or you can specify the path to the .env file
pub fn main() {
dotenv_gleam.config_with("path/to/.env") // this should load .env filelet assert Ok(test) = envoy.get("TEST")
let assert Ok(bar) = envoy.get("BAR")
}```
and its documentation can be found at .