bs-promise-router
v0.2.0
Published
BuckleScript interface to express-promise-router
Downloads
7
Maintainers
Readme
bs-promise-router
A BuckleScript interface to express-promise-router.
Example
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));