Module Madge_server.Make_apply_controller

Parameters

module E : Endpoints

Signature

type env = E.env

An environment that apply_controller will pass to Endpoints.dispatch. Madge does not care what is in it, and it can very much be unit.

val apply_controller : env -> Request.t -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Nes.Lwt.t

A function that, given a request, finds a matching route, dispatches to the appropriate controller, and responds correctly.