Skip to content

Resolve the coexistent fault between body-parser and http-proxy.

License

Notifications You must be signed in to change notification settings

wister/coexist-parser-proxy

 
 

Repository files navigation

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'});
})

About

Resolve the coexistent fault between body-parser and http-proxy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%