Skip to content

Latest commit

 

History

History
55 lines (37 loc) · 2.73 KB

configuration.md

File metadata and controls

55 lines (37 loc) · 2.73 KB

Dirac DevTools Configuration

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:

  1. Dirac Agent
  2. Dirac nREPL middleware
  3. Dirac Runtime - page-specific configuration

In general, the configuration can come from different sources:

  1. hard-coded defaults
  2. environment
  3. 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:

  1. environmental variables
  2. Java system properties
  3. .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.

Dirac Agent configuration

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.

Dirac nREPL middleware configuration

Please consult this file for possible defaults and their environmental counterparts.

Dirac Runtime - page-specific configuration

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.