@routex/body-parser
v0.1.1
Published
Body parsing for Routex
Readme
Routex Body Parser

Body parsing for Routex.
Example
Install:
yarn add @routex/body-parser
# or
npm add @routex/body-parserSetup your app:
const { Routex, JsonBody } = require("routex");
const bodyParser = require("@routex/body-parser");
const port = process.env.PORT || 3000;
const app = new Routex();
app.use(bodyParser.json());
app.get("/", (ctx) => {
ctx.body = new JsonBody(ctx.req.body);
});
app.listen(port).then(() => console.log(`Listening on ${port}`));The parsed body is available under ctx.req.body.
Support
We support all currently active and maintained Node LTS versions, include current Node versions.
Please file feature requests and bugs at the issue tracker.
