0.1.0 • Published 4 years ago

@jups/body-json v0.1.0

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

jups-body-json

NPM Version NPM Downloads Install Size

An extension for the jups package for parsing JSON body data.

Installation

npm i @jups/body-json

Usage

const jups = require('jups');
const bodyJSON = require('@jups/body-json');

jups()
    .use(bodyJSON)
    .post('/', (req, res) => {
        res.end(req.body.name);
    })
    .listen(3000);

For Typescript just use the following import syntax.

import bodyJSON from '@jups/body-json';