Skip to content

xmonader/nim-loadenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

loadenv

Load your .env files easily into your nim application

Example

  let envFile = """
SEND_GRID_TOK = 12312aeabasd123sad12r54
# COMMENTED = VALUE
SEND_GRID_USER = root
"""
  let envFilePath = getTempDir()/"testfile.env"
  writeFile(envFilePath, envFile)
  loadenv.loadEnv(envFilePath)

  assert os.existsEnv("SEND_GRID_USER") == true
  assert os.existsEnv("SEND_GRID_TOK") == true
  assert os.existsEnv("COMMENTED") == false
  • In case of another separator other than = you can pass sep char to loadEnv function

About

load environment file to your nim application

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages