Skip to content

cwhitey/dotty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clojars Project

dotty

Retrieves environment variables, prioritizing those defined in {project_root}/.env.

  • Ignores single-line comments (using #)
  • Handles empty lines gracefully
  • Preserves double-quotes and newline characters in env values

Aims to have rules-parity with dotenv written for node.js.

Usage

(require '[dotty.core :refer [env]])

(env "PATH")
;=> "/bin:/usr/bin:/usr/local/bin"

Given your project's .env file contains:

MY_SECRET_KEY=foo1234

Retrieve it with the following:

(env "MY_SECRET_KEY")
;=> "foo1234"

License

Copyright © 2018 Callum White

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

Retrieve environment variables from .env

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published