Module Jerboa
module Meth : sig ... endJerboa.Methcontains only the type definition of a Http method.
module Cookie : sig ... endJerboa.Cookiemodule only contain the type definition of a cokkie and a constructor.
module Header : sig ... endJerboa.Headermodule consists of the type definition of header and also functions working on this type.
module Request : sig ... endJerboa.requestmodule consists of the type definition of the Request record.
module Response : sig ... endJerboa.requestmodule contains the type definition of the Request record and a constructor for the Response.
module Path : sig ... endJerboa.Pathcontains the type definition of the Path record and also a variety of constructors.
module Request_handler : sig ... endJerboa.Request_handlercontains only the type definnition of a request handler.
module Path_mapping : sig ... endJerboa.Path_mappinghas the type definition of the path mapping.
module Path_handler : sig ... endJerboa.Path_handlermodule consists of the type definition of the Path_handler and an easy to use constructor.
val default_request_handler : 'a -> Response.tJerboa.default_request_handleris the default request handler that will be run when no matching path is found by Jerboa. It gives back a http 404 response with an empty body.
val start : ?port:int -> ?default_request_handler:(Request.t -> Response.t) -> ?middleware_config:(Request.t -> Request.t) Base.List.t -> Path_handler.t Base.List.t -> unitJerboa.start ?port ?default_request_handler ?middleware_config path_handler_configis the starting point of Jerboa, which starts the framework.- port(optional): gives the port of the running framework (default is 8080)
- default_request_handler(optional): request handler, which will be run if Jerboa can't find matching path_handler (default is default_request_handler)
- middleware_config(optional): list of middlewares that transforms the request before the matching handler is found (default is empty list)
- path_handler_config: list of path handlers that will be matched by jerboa based on the request