Skip to main content

Crate bobview_server

Crate bobview_server 

Source
Expand description

Serve bobview to browsers.

One process gives a browser everything the web build needs, all from the same origin: the app itself, the .bob files and a PV Web Socket (PVWS) at /pvws/pv that speaks the protocol of https://github.com/ornl-epics/pvws and reaches PVs through bobview’s own CA/PVA layer. Run it anywhere caget works and point a browser at it.

Modules§

files 🔒
Serve files from the served directories without following symbolic links out of them (the default; see –follow-symlinks).
pvws 🔒
A PV Web Socket server in the dialect of https://github.com/ornl-epics/pvws.

Constants§

TOKEN_VAR 🔒
The environment variable holding the write token.
USAGE 🔒

Functions§

default_web 🔒
The web build installed next to this binary, else the one scripts/build-web.sh writes in a checkout.
hide_dot_files 🔒
Hide dot-files and dot-dirs, such as .git when --opi is a checkout.
is_hidden 🔒
Whether a path names a dot-file or something in a dot-dir. ServeDir decodes the whole path before splitting it, so this does too: %2F is a separator to it.
main 🔒
no_framing 🔒
Stop other sites’ pages framing this server’s (clickjacking: a page could lay its own over a display’s buttons).
parse 🔒
random_token 🔒
128 random bits as hex, from the operating system.