package stog_server

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Stog preview

val client_js : string

The javascript file containing client code for preview

val default_css : string

The default server CSS file in files embedded in server

val respond_js : string -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t

Respond the given string with javascript mime-type.

val respond_css : string -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t

Respond the given string with CSS mime-type.

val respond_server_client_js : (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t

Respond 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.t

Respond the default server CSS file

val handle_preview : http_url:Stog.Url.url_config -> ws_url:Stog.Url.url_config -> Run.state option Stdlib.ref -> Cohttp.Request.t -> string list -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t

handle_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 Stdlib.ref * ('a * (Websocket.Frame.t -> unit Lwt.t)) list Stdlib.ref

new_stog_session stog stog_base_url returns a fresh stog state reference and a fresh connection list reference.

OCaml

Innovation. Community. Security.