Module Morph.Server
type handler
= Opium_core.Service.t(Request.t, Response.t)
;A
handler
takes aRequest.t
and returns aResponse.t
wrapepd in aLwt.t
See
Opium_core.Service.t
for documentation on Services.
type middleware
= Opium_core.Filter.simple(Request.t, Response.t)
;A
middleware
takes ahandler
and returns ahandler
.See
Opium_core.Filter.t
for documentation on Filters.
type t
=
{
start: handler => Lwt.t(unit),
port: int,
}
;A
Server.t
is a record that describes a server.