dragonrend-json-body-parser

0.4.2 • Public • Published

Build Status GitHub license

Dragonrend JSON Body Parser

Installation

$ npm install dragonrend-json-body-parser

Example

const { Dragonrend } = require('dragonrend')
const jsonBodyParser = require('dragonrend-json-body-parser')
 
const app = new Dragonrend()
 
jsonBodyParser(app)
 
app.post((ctx) => {
  // Parsed Request Body in ctx.request.body
  const { body } = ctx.request
  // Do something with Request's JSON body
})
 
app.toServer().listen(8080)

Author

Egor Repnikov - GitHub

License

This project is licensed under the MIT License - see the LICENSE file for details

Package Sidebar

Install

npm i dragonrend-json-body-parser

Weekly Downloads

0

Version

0.4.2

License

MIT

Unpacked Size

4.54 kB

Total Files

7

Last publish

Collaborators

  • egorrepnikov