package stog_server
Module Stog_server.PreviewSource
Stog preview
The javascript file containing client code for preview
The default server CSS file in files embedded in server
Respond the given string with javascript mime-type.
Respond the given string with CSS mime-type.
Respond the content of the given javascript file, looked up in server embedded files.
Respond the default server CSS file
Source
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.
Source
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.