Skip to main content

USAGE

Constant USAGE 

Source
pub(crate) const USAGE: &str = "\
usage: bobview-server [OPTIONS]

Serve the bobview web build, .bob files and a PV Web Socket on one port.
Open http://HOST:PORT/?display=FILE.bob in a browser (default index.bob).

  -p, --port PORT        port to listen on (default 8080)
  --bind ADDR            address to listen on (default 127.0.0.1, this machine
                         only; 0.0.0.0 is every interface)
  --web DIR              the web build from scripts/build-web.sh (default
                         ../share/bobview/web next to this binary, else dist/web)
  --opi DIR              serve .bob files from here; they take precedence over
                         files of the same name in the web build
  --follow-symlinks      serve files through symbolic links that lead out of
                         --opi or --web (refused by default)
  --write                let browsers write to PVs (off by default, as in PVWS);
                         every write must carry the write token
  --write-token TOKEN    the token --write wants (default: $BOBVIEW_WRITE_TOKEN
                         if set and not empty, else a random one printed at
                         startup); a page passes it as &token=TOKEN. Prefer
                         the variable: arguments show in `ps`
  --allow-origin ORIGIN  also let pages from ORIGIN connect, e.g.
                         https://host.example.com (may be repeated); other
                         pages than this server's own are refused
  --host NAME            let browsers call this server NAME, as well as an IP
                         address, localhost, this machine's name and the hosts
                         of --allow-origin (may be repeated)
  --max-per-ip N         most clients at once from one address (default 10;
                         raise it behind a reverse proxy, which is one address)
  --throttle-ms MS       least time between two batches of updates to one
                         client (default 100); a PV that changes faster sends
                         only its latest value
  -h, --help             show this help
  -V, --version          show the version
";