Proxy by directory routes request to web servers using url prefixes
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Proxies requests based on the url directory (e.g. /database, /articles, etc...). It is Similar to proxy-by-url, but works with http-proxy 1.0 api.

var server = require('http').createServer(require('proxy-by-directory')({
    '/articles' : { target : 'http://localhost:5555/' },
    '/' : { target : '' }