DEV Community

Cora Sutton
Cora Sutton

Posted on

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!

Oldest comments (0)