Hacker News new | ask | show | jobs
Show HN: Simple reverse proxy router in Node.js for multi tenant server (github.com)
1 points by durkes 1181 days ago
I am excited to share my latest creation: a powerful yet super simple Node.js reverse proxy server that forwards HTTP requests to a specified port based on the request host header / domain.

I use this for running multiple processes on a single server for different domains or subdomains. It supports "hot reload" by just editing the map object in the configuration file, and works great behind something like Cloudflare.

1 comments

Example config:

const domainToPort = { 'localhost:3000': 3001, 'example.com': 3002, 'api.example.com': 3003, };