This project is a reverse proxy server built with Node.js and TypeScript. It uses a YAML configuration file to define server settings, upstream servers, and routing rules.
- Load balancing across multiple upstream servers
- Configurable routing rules
- Cluster support for utilizing multiple CPU cores
- Node.js (>= 14)
- pnpm (>= 6)
-
Clone the repository:
git clone <repository-url> cd reverse-proxy
-
Install dependencies:
pnpm install
The server configuration is defined in a YAML file (config.yaml). Below is an example configuration:
server:
listen: 8080
workers: 4
upstreams:
- id: node1
url: bipinparajuli.com.np
- id: node2
url: bipinparajuli.com.np
rules:
- path: /
upstreams:
- node1
- node2
- path: /blog
upstreams:
- node2