DEV Community

Cora Sutton
Cora Sutton

Posted on

3 1

Read environment variables in Clojure

Do you want to load some configuration values from the environment in Clojure?

Great news! Clojure makes this easy!

(System/getenv "SHELL")
;=> /usr/local/bin/zsh
Enter fullscreen mode Exit fullscreen mode

There are many other ways to configure your Clojure application, and some of us have our favorites, but environment variables often factor in.

Give it a shot and see what you can learn!

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay