procsy
A proxy building helper with subdomain support
Last updated 6 months ago by lucasconstantino .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install procsy 
SYNC missed versions from official npm registry.

procsy

A proxy building helper with subdomain support.

oclif Version Downloads/week License

Usage

npm install -g procsy

procsy -t http://google.com

Subdomains

Subdomain proxying in the localhost requires you configure the hosts file properly.

To proxy subdomain based requests, you can specify source subdomains and their targets in the following syntax:

[subdomain],[target]

Examples:

1. Single subdomain

hosts:

127.0.0.1 app.dev api.app.dev

command:

procsy -t api,http://my-external-api.com

outcome:

from to
http://api.local.dev/path http://my-external-api.com/path
http://local.dev/path 404

2. Multiple subdomains

hosts:

127.0.0.1 app.dev api.app.dev tracking.app.dev

command:

procsy -t api,http://my-external-api.com tracking,http://analytics.com

outcome:

from to
http://api.local.dev/path http://my-external-api.com/path
http://tracking.local.dev/path http://analytics.com/path
http://local.dev/path 404

3. Subdomain & domain

hosts:

127.0.0.1 app.dev api.app.dev

command:

procsy -t api,http://my-external-api.com *,http://my-app.com

outcome:

from to
http://api.local.dev/path http://my-external-api.com/path
http://local.dev/path http://my-app.com/path

Current Tags

  • 1.0.0                                ...           latest (6 months ago)

1 Versions

  • 1.0.0                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |