https://github.com/julienlavocat/dynamicreverseproxy
NodeJS Dynamic reverse proxy
https://github.com/julienlavocat/dynamicreverseproxy
js nginx nodejs proxy-server reverse-proxy
Last synced: about 1 year ago
JSON representation
NodeJS Dynamic reverse proxy
- Host: GitHub
- URL: https://github.com/julienlavocat/dynamicreverseproxy
- Owner: JulienLavocat
- Archived: true
- Created: 2019-01-20T15:10:22.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-20T19:08:33.000Z (over 7 years ago)
- Last Synced: 2025-03-02T10:31:43.587Z (over 1 year ago)
- Topics: js, nginx, nodejs, proxy-server, reverse-proxy
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DynamicReverseProxy
DynamicReverseProxy (DRP) is a simple NodeJS reverse proxy which works like a normal reverse proxy, except that you don't need to configure each subdomain.
DRP let you create a subdomain per customer, project, anything you want by simply making an API call.
## Usage
### DRP Setup
1) Download and install Redis (https://redis.io/download)
2) Edit DRP's config (config.json)
3) Start DRP using: `node app.js`
### Subdomains registration
1) Create a new DNS record with a wildcard as subdomain like this `*.exemple.com` and point it where DynamicReverseProxy is listening
2) To register a new subdomain use this endpoint:
```
POST - /drp/routes
{"source":"publicly.accessible.domain", "target":"http://another-service.internal:8000"}
```
3) If you want to modify a route, just post it again with the new target
3) If you want to delete a route, just call:
`DELETE - /drp/routes/:domain`