A BuckleScript interface to express-promise-router.
let heartbeat = (_, res: Express.Response.t) => {
Express.Response.sendString(res, "ok") |> ignore;
Js.Promise.resolve(Js.undefined)
};
let router = PromiseRouter.make();
PromiseRouter.get(router, ~path="/", heartbeat);
Express.App.use(app, asMiddleware(router));
let heartbeat _ (res : Express.Response.t) =
(Express.Response.sendString res "ok") |> ignore;
Js.Promise.resolve Js.undefined
let router = PromiseRouter.make ()
let _ = PromiseRouter.get router ~path:"/" heartbeat
let _ = Express.App.use app (asMiddleware router)