Functions for pulling values from environment variables.
Functions for pulling values from environment variables.
Coerce a value to the type referenced by a symbol. By default supports
Int and Str.
Coerce a value to the type referenced by a symbol. By default supports `Int` and `Str`.
(env name)(env name type & options)Resolve an environment variable by name. Optionally accepts a type for
coercion, and a keyword option, :or, that provides a default value if the
environment variable is missing.
The arguments may optionally be wrapped in a vector. This is to support their use in [[duct.core/read-config]]. For example:
{:port #duct/env ["PORT" Int :or 3000]}
Resolve an environment variable by name. Optionally accepts a type for
coercion, and a keyword option, `:or`, that provides a default value if the
environment variable is missing.
The arguments may optionally be wrapped in a vector. This is to support
their use in [[duct.core/read-config]]. For example:
{:port #duct/env ["PORT" Int :or 3000]}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |