Liking cljdoc? Tell your friends :D

vaelii.serve

The headless daemon: one process owns one KB and serves it as EDN over HTTP.

Public because it is a documented entry point — lein serve, or lein run -m vaelii.serve 4200 /var/lib/vaelii. The implementation is vaelii.impl.serve, which is free to change.

It binds loopback, and authenticates with one shared bearer token (VAELII_API_TOKEN) — required to bind anything else. Read .github/SECURITY.md before --listen names an address.

The headless daemon: one process owns one KB and serves it as EDN over HTTP.

Public because it is a documented entry point — `lein serve`, or
`lein run -m vaelii.serve 4200 /var/lib/vaelii`.  The implementation is
`vaelii.impl.serve`, which is free to change.

It binds loopback, and authenticates with one shared bearer token
(`VAELII_API_TOKEN`) — required to bind anything else.  Read `.github/SECURITY.md`
before `--listen` names an address.
raw docstring

-mainclj

(-main & args)

Run the daemon in the foreground. Args: [port [dir]] [--listen ADDR]dir selects the durable :disk backend, and with no dir the KB lives only as long as the process. --listen with a non-loopback address requires VAELII_API_TOKEN; without one it is a line on stderr and exit 2.

Run the daemon in the foreground.  Args: `[port [dir]] [--listen ADDR]` — `dir`
selects the durable `:disk` backend, and with no `dir` the KB lives only as long as
the process.  `--listen` with a non-loopback address requires `VAELII_API_TOKEN`;
without one it is a line on stderr and exit 2.
sourceraw docstring

appclj

(app kb)
(app kb opts)

The ring handler for kb — pure request -> response, so it is tested without a socket. :host names the interface it will be served on, which fixes the Host values it answers to; :token is the bearer token every request must present (VAELII_API_TOKEN when the key is absent, an explicit nil to serve open).

The ring handler for `kb` — pure `request -> response`, so it is tested without a
socket.  `:host` names the interface it will be served on, which fixes the `Host`
values it answers to; `:token` is the bearer token every request must present
(`VAELII_API_TOKEN` when the key is absent, an explicit nil to serve open).
sourceraw docstring

opsclj

The reachable operations, keyed by op keyword — the allowlisted vaelii.core surface a client can drive.

The reachable operations, keyed by op keyword — the allowlisted `vaelii.core`
surface a client can drive.
sourceraw docstring

portclj

(port server)

The actual TCP port a started server is listening on.

The actual TCP port a started server is listening on.
sourceraw docstring

startclj

(start kb opts)

Start the daemon over kb and return the running Jetty server (non-blocking, so the caller controls its lifetime). Opts: :port (default 4200; 0 binds an ephemeral one, read it back with port), :host (default loopback) and :token (app's).

Start the daemon over `kb` and return the running Jetty server (non-blocking, so the
caller controls its lifetime).  Opts: `:port` (default 4200; `0` binds an ephemeral
one, read it back with `port`), `:host` (default loopback) and `:token` (`app`'s).
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close