now-server
Create a proxy sever from a rules.json
following specifications in https://zeit.co/docs/features/path-aliases. The server will behave identical
to now alias [your-domain.com] -r rules.json
.
It will not manage your microservices, but this is easy to configure with pm2.
Getting Started
npm install -g now-server pm2
Create a rules.json
with
For example:
The apps
part follows the pm2 application declaration.
Usage
# proxy server only now-server -r rules.json -p 3000 # proxy server with microservices pm2 start rules.json pm2 ls # status pm2 kill # kill it
Changelog
0.4.0
- bugfix broken path forwarding
0.3.0
- Add not found handling
- Don't prepend path of destination (now does not do that either!)
0.2.1 - bugfix to make script run with node