Development Mode
Pedestal can operate in two different modes: production, and local development.
Local development mode changes the behavior of a handful of macros and functions to support live development at the REPL.
Development mode is enabled by setting value of JVM system property io.pedestal.dev-mode
to true
at startup.
From the command line, this can be accomplished by using the -J
switch:
clj -J-Dio.pedestal.dev-mode=true ...
Alternately, you can update your deps.edn
file, associating a JVM option with an alias:
...
:aliases
{:dev-mode
{:jvm-opts ["-Dio.pedestal.dev-mode=true"]}
...
You can then reference the alias when starting a REPL session:
clj -A:dev-mode ...
The var dev-mode?
stores the boolean result derived from reading the system property;
there is no mechanism for turning development mode on or off during execution.