@nanoexpress/middleware-body-parser
TypeScript icon, indicating that this package has built-in type declarations

1.2.3 • Public • Published

body-parser

body-parser middleware for nanoexpress

You can use express body-parser middleware instead of this middleware

Installation

npm i @nanoexpress/middleware-body-parser
# or
yarn add @nanoexpress/middleware-body-parser

Example

See the examples directory

Usage

ESM Module

import bodyParser from '@nanoexpress/middleware-body-parser';

app.use(bodyParser());

CJS Module

const bodyParser = require('@nanoexpress/middleware-body-parser/cjs');

app.use(bodyParser());

Options

Options name Default Required Description
options.json true No Parse JSON data with content-type of application/json or text/json into JS Object?
options.urlEncoded true No Parse JSON data with content-type of x-www-form-urlencoded into JS Object?

License

MIT

Package Sidebar

Install

npm i @nanoexpress/middleware-body-parser

Weekly Downloads

46

Version

1.2.3

License

MIT

Unpacked Size

8.46 kB

Total Files

6

Last publish

Collaborators

  • dalisoft