let json_err: Stdlib.result('a, 'b) => Stdlib.result('a, [> `String('b) ]);
let h2_handler: ?error_handler:(Unix.sockaddr => H2.Server_connection.error_handler) => request_handler:(Unix.sockaddr => H2.Server_connection.request_handler) => H2_lwt_unix__.Ssl_io.server => Unix.sockaddr => Lwt_unix.file_descr => Lwt.t(unit);
let http1_handler: ?error_handler:(Unix.sockaddr => Httpaf.Server_connection.error_handler) => request_handler:(Unix.sockaddr => Httpaf.Server_connection.request_handler(Httpaf_lwt_unix__.Ssl_io.Io.socket)) => Httpaf_lwt_unix__.Ssl_io.server => Unix.sockaddr => Lwt_unix.file_descr => Lwt.t(unit);
let startHttpServer: ?port:int => context:'a => make_routes_callback:(httpImpl:HttpImpl.t(Httpaf.Method.t, Httpaf.Headers.t, Httpaf.Status.t, Httpaf.Response.t, Httpaf.Reqd.t('b)) => context:'a => Httpaf.Reqd.t(Lwt_unix.file_descr) => Lwt.t(unit)) => unit => Lwt.t('c);
let first_match: list('a) => list('a) => option('a);
let startHttpsServer: ?port:int => cert:string => priv_key:string => context:'a => make_routes_callback:'b => unit => Lwt.t('c);
let start: ?http1_port:int => ?http2_port:int => context:'a => make_routes_callback:(httpImpl:HttpImpl.t(Httpaf.Method.t, Httpaf.Headers.t, Httpaf.Status.t, Httpaf.Response.t, Httpaf.Reqd.t('b)) => context:'a => Httpaf.Reqd.t(Lwt_unix.file_descr) => Lwt.t(unit)) => ?cert:string => ?priv_key:string => unit => Lwt.t(unit);