Stog_server.PreviewStog preview
val respond_js : string -> (Cohttp.Response.t * Cohttp_lwt__.Body.t) Lwt.tRespond the given string with javascript mime-type.
val respond_css : string -> (Cohttp.Response.t * Cohttp_lwt__.Body.t) Lwt.tRespond the given string with CSS mime-type.
val respond_server_client_js : (Cohttp.Response.t * Cohttp_lwt__.Body.t) Lwt.tRespond the content of the given javascript file, looked up in server embedded files.
val respond_default_css : (Cohttp.Response.t * Cohttp_lwt__.Body.t) Lwt.tRespond the default server CSS file
val handle_preview :
http_url:Stog.Url.url_config ->
ws_url:Stog.Url.url_config ->
Run.state option ref ->
Cohttp.Request.t ->
string list ->
(Cohttp.Response.t * Cohttp_lwt__.Body.t) Lwt.thandle_preview http_url ws_url current_state req path responds the preview page, which contains a reference to client javascript code which, when loaded, will ask for stog document with path path.
val new_stog_session :
Stog.Types.stog ->
Stog.Url.t ->
Run.state option ref * ('a * (Websocket.Frame.t -> unit Lwt.t)) list refnew_stog_session stog stog_base_url returns a fresh stog state reference and a fresh connection list reference.