tiny-json-body-parser
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Tiny JSON Body Parser

A tiny middleware that parses JSON request bodies.

Install

npm install --save tiny-json-body-parser

Usage

import express from 'express';
import json from 'tiny-json-body-parser';

const app = express ();

app.use ( json ({ limit: 1_000_000 }) ); // 1MB limit

app.post ( '/', req => {

  console.log ( req.body ); // The result of JSON.parse-ing the body

});

License

MIT © Fabio Spampinato

Dependents (2)

Package Sidebar

Install

npm i tiny-json-body-parser

Weekly Downloads

0

Version

2.0.0

License

none

Unpacked Size

5.46 kB

Total Files

11

Last publish

Collaborators

  • fabiospampinato