Module Morph
let start: servers:list(Server.t) => ?middlewares:list(Server.middleware) => Server.handler => Lwt.t(unit);
start servers middlewares handler
starts the server.Simple usage:
Morph.start(_request => Http.Response.Ok.make) |> Lwt_main.run;
module Server: { ... };
module Request: { ... };
Defines the
request
type
module Response: { ... };
Defines the
response
type and helper functions to easily create responses inMorph
.
module Method: { ... };
module Status: { ... };