Installation instructions rely on sane default settings. Depending on your setup you might need to provide a custom configuration.
There are three areas where custom configuration can be provided:
- Dirac Agent
- Dirac nREPL middleware
- Dirac Runtime - page-specific configuration
In general, the configuration can come from different sources:
- hard-coded defaults
- environment
- a config map provided as an argument
Configuration options from later source override settings from previous sources.
Environmental variables have always prefix "DIRAC" and are named after corresponding option key in the hard-coded defaults config map. We use environ library for reading environmental settings, so you have multiple ways how to define them:
- environmental variables
- Java system properties
.lein-env
file.
You can for example use lein-environ
plugin to specify environmental variables directly in your project.clj
or alternatively lein-boot
for boot scenario.
Please refer to environ docs for further info.
Please consult this file for possible defaults and their environmental counterparts.
If you invoke dirac.agent/boot!
from code
you can override config options with a config map specified as an argument. Actually this is what
dirac.agent-cli
does by reading
command-line arguments and converting some of them to config options.
Please consult this file for possible defaults and their environmental counterparts.
When you open/refresh Dirac DevTools it asks current page for effective runtime page-specific Dirac config
(see dirac.runtime.repl/get-effective-config
.
The most important setting is a connection info for Dirac Agent. This allows flexibility of configuring individual
ClojureScript projects with their own settings instead of providing one system-wide configuration. In theory
you can have different projects connecting do different Dirac Agents (which are connected to different nREPL servers).
Please consult this file for possible defaults and their environmental counterparts.