0.1.1 • Published 4 years ago

@routex/body-parser v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

Routex Body Parser npm Travis CI Codecov

Body parsing for Routex.

Documentation - GitHub

Example

Install:

yarn add @routex/body-parser
# or
npm add @routex/body-parser

Setup 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.

0.1.1

4 years ago

0.1.0

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago