Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.gateway.server.web

Serve the prebuilt Companion web app from the gateway root, so vis-agent web needs no Node.js at runtime.

Release installs unpack vis-web.tar.gz beside the native runtime, and the launcher exports that folder as VIS_WEB_DIR; a source checkout points it at apps/vis-companion/dist-web. The launcher names the folder even before it exists and the gateway looks it up on every request, so a build or install that lands after the gateway started is served without a restart. Until the folder holds an index.html the gateway serves its API alone.

The bundle is public content, like /docs: it holds no secret, and the app authenticates its own API calls. Only GET and HEAD requests for a file that exists inside the folder are answered here; the API, the docs and every missing file fall through to the router unchanged.

Serve the prebuilt Companion web app from the gateway root, so `vis-agent web`
needs no Node.js at runtime.

Release installs unpack `vis-web.tar.gz` beside the native runtime, and the
launcher exports that folder as `VIS_WEB_DIR`; a source checkout points it at
`apps/vis-companion/dist-web`. The launcher names the folder even before it
exists and the gateway looks it up on every request, so a build or install
that lands after the gateway started is served without a restart. Until the
folder holds an `index.html` the gateway serves its API alone.

The bundle is public content, like `/docs`: it holds no secret, and the app
authenticates its own API calls. Only GET and HEAD requests for a file that
exists inside the folder are answered here; the API, the docs and every
missing file fall through to the router unchanged.
raw docstring

configured-dirclj

(configured-dir)

The web app folder the launcher names in VIS_WEB_DIR. It may not exist yet.

The web app folder the launcher names in `VIS_WEB_DIR`. It may not exist yet.
sourceraw docstring

configured-rootclj

(configured-root)
(configured-root dir)

The canonical web app folder named by dir (configured-dir by default), or nil when it is unset or holds no index.html.

The canonical web app folder named by `dir` ([[configured-dir]] by default), or
nil when it is unset or holds no `index.html`.
sourceraw docstring

wrap-webclj

(wrap-web handler)
(wrap-web handler dir)

Answer GET and HEAD requests for the web app's own files from the folder dir names (configured-dir by default). configured-root resolves the folder per request, so a build or install that lands later is served at once. A blank dir returns handler unchanged.

Answer GET and HEAD requests for the web app's own files from the folder `dir`
names ([[configured-dir]] by default). [[configured-root]] resolves the folder
per request, so a build or install that lands later is served at once. A blank
`dir` returns `handler` unchanged.
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