package stog

  1. Overview
  2. Docs

Registering a server

val http_url : string ref

Default URL, modified by command line option

val ws_url : string ref

Default websocket URL, modified by command line option

val pub_http_url : string option ref

Optional public HTTP URL, modified by command line option

val pub_ws_url : string option ref

Optional public websocket URL, modified by command line option

type server_mode = [
  1. | `Multi of string list -> unit
  2. | `Single of (unit -> Types.stog) -> Types.stog -> unit
]

Multi server: handling users, sessions with editor and preview for each session.

Single: Simple preview server.

val server_mode : server_mode option ref
val set_single : ((unit -> Types.stog) -> Types.stog -> http_url:Url.url_config -> ws_url:Url.url_config -> unit) -> unit
val set_multi : (http_url:Url.url_config -> ws_url:Url.url_config -> string list -> unit) -> unit