2.0.0 • Published 2 years ago

tiny-json-body-parser v2.0.0

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

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