File: Built-in-nREPL-Service.md

package info (click to toggle)
trapperkeeper-clojure 4.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 964 kB
  • sloc: sh: 189; xml: 73; makefile: 25; java: 5
file content (40 lines) | stat: -rw-r--r-- 1,689 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Configuring the nREPL service

The `nREPL` service is intended to be used as a debugging tool and not directly called by any other application code, so no useful functions are directly exported by this service. A `shutdown` function is provided solely to allow the shutdown service to cleanly stop the `nREPL` server.

The `nrepl` section in a _Trapperkeeper_ configuration file specifies all the settings needed to start up an `nREPL` server attached to _Trapperkeeper_.

## `boostrap.cfg`

By default, the nrepl service is not put into your application's `bootstrap.cfg`. If you want to use this service, add 
`puppetlabs.trapperkeeper.services.nrepl.nrepl-service/nrepl-service` to your `bootstrap.cfg` and enable it in your config.

## `enabled`

The `enabled` flag is a boolean value, which can be set to either `"true"` or `"false"`. When this is set to true, the `nREPL` server will start and accept connections. If this value is not specified then `enabled=false` is assumed.

## `host`

The IP address to bind the nREPL server to. If not specified then `0.0.0.0` is used, which indicates binding to all available interfaces.

## `port`

The port that the `nREPL` server is bound to. If no port is defined then the default value of `7888` is used.

## `middlewares`

A list of nREPL middlewares to load; for example, for compatibility with LightTable or other editors.

## Typical `config.conf` for nREPL

```conf
nrepl {
   port = 12345
   enabled = true
   middlewares = [lighttable.nrepl.handler/lighttable-ops]
}
```

## The `nREPL` server

For more information on the nREPL server see [the nREPL server README](https://github.com/clojure/tools.nrepl/blob/master/README.md).