coexist-parser-proxy

1.0.8 • Public • Published

coexist-parser-proxy

Resolve the coexistent fault among multer, body-parser and http-proxy(-middleware).

Usage

An Express.js middleware is exported. As a result, all that you need is to import and use it before hooking body-parser and http-proxy middleware.

npm i -S coexist-parser-proxy
const middleware = require('coexist-parser-proxy');
const express = require('express');
const app = express();
// ...
app.use(middleware);
// ...
app.use(bodyParser.json());
app.use(bodyParser.raw());
app.use(bodyParser.text());
// ...
app.use((req, res) => {
    proxy.web(req, res, {target: 'http://mytarget.com:8080'});
})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.8
    215
    • latest

Version History

Package Sidebar

Install

npm i coexist-parser-proxy

Weekly Downloads

215

Version

1.0.8

License

MIT

Unpacked Size

5.92 kB

Total Files

7

Last publish

Collaborators

  • stuart_zhang