Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@doodle/proxy / README.md
Size: Mime:

@doodle/proxy

Run locally

yarn
yarn build
cd dist/
yarn link
// then cd into the project where you wanna use it and:
yarn link "@doodle/proxy"

Test

yarn lint
yarn test --watch

Usage in other node backends

const proxyMiddleware = require('@doodle/proxy');

(...)

server.use('/oab', proxyMiddleware({ target: yourDestinationURLHost, parseJSON: true }));

Depending on the flags you supply to it, it will return 1 (the proxy itself) or more middlewares.

For instance, when passing parseJSON it will also add the bodyparser.json() middleware before the proxy one.