Skip to content

Grubba27/dotenv_gleam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotenv_gleam

Package Version Hex Docs

Similar to Node dotenv and Ruby dotenv

Installation

If available on Hex this package can be added to your Gleam project:

gleam add dotenv_gleam

then in your code:

import dotenv_gleam
import envoy // do not forget to add envoy to the project

pub fn main() {
  dotenv_gleam.config() // this should load .env file

  let 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 file

  let assert Ok(test) = envoy.get("TEST")
  let assert Ok(bar) = envoy.get("BAR")
}

and its documentation can be found at https://hexdocs.pm/dotenv_gleam.

About

dotenv for gleam

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages