A powerful reverse proxy and load balancing configuration generator for Express.js applications.
A CLI tool for generating reverse proxy and load balancing configurations for Express.js applications β with support for Nginx, Caddy, and Traefik, and two simple modes to get you running fast.
Built for modern backend development:
- π Reverse proxy configuration for Express.js apps
- βοΈ Load balancing across multiple Express instances
- π Nginx, Caddy, and Traefik support
- π‘οΈ Security headers included by default
- π³ Docker Compose ready
- π― Interactive mode for guided setup
- π¨ Simple flag-based CLI for quick configuration
Simply run the command and follow the prompts:
npx @excli/proxyThe interactive mode will guide you through selecting:
- Proxy server (Nginx, Caddy, or Traefik)
- Mode (Reverse Proxy or Load Balancing)
For experienced users who know what they want:
# Nginx reverse proxy
npx @excli/proxy --nginx --reverse-proxy
# Caddy load balancing
npx @excli/proxy --caddy --load-balancing
# Traefik reverse proxy
npx @excli/proxy --traefik --reverse-proxyOr install globally:
npm install -g @excli/proxy
# Interactive mode
excli-proxy
# With flags
excli-proxy --nginx --reverse-proxy
excli-proxy --caddy --load-balancing
excli-proxy --traefik --reverse-proxy- Node.js 20 or higher
- Docker Desktop or Docker Engine (required for running generated configurations)
1. Interactive Mode (Easiest)
npx @excli/proxyJust answer the prompts and you're done!
2. Flag-Based Mode (Fastest)
# Nginx with reverse proxy
npx @excli/proxy --nginx --reverse-proxy
# Nginx with load balancing
npx @excli/proxy --nginx --load-balancing
# Caddy with reverse proxy
npx @excli/proxy --caddy --reverse-proxy
# Caddy with load balancing
npx @excli/proxy --caddy --load-balancing
# Traefik with reverse proxy
npx @excli/proxy --traefik --reverse-proxy
# Traefik with load balancing
npx @excli/proxy --traefik --load-balancing--nginx- Use Nginx as the proxy server--caddy- Use Caddy as the proxy server--traefik- Use Traefik as the proxy server
--reverse-proxy- Generate a reverse proxy configuration--load-balancing- Generate a load balancing configuration
All valid combinations:
npx @excli/proxy --nginx --reverse-proxy
npx @excli/proxy --nginx --load-balancing
npx @excli/proxy --caddy --reverse-proxy
npx @excli/proxy --caddy --load-balancing
npx @excli/proxy --traefik --reverse-proxy
npx @excli/proxy --traefik --load-balancing- nginx.conf / Caddyfile / traefik.yaml - Production-ready proxy configuration
- compose.yaml - Multi-service orchestration for your proxy + Express instances
| Proxy | SSL/TLS | Modes | Config File |
|---|---|---|---|
| Nginx | Manual cert config | reverse-proxy, load-balancing | nginx.conf |
| Caddy | Automatic HTTPS (ACME) | reverse-proxy, load-balancing | Caddyfile |
| Traefik | Automatic HTTPS (ACME) | reverse-proxy, load-balancing | traefik.yaml |
docker compose up # Start proxy and Express instances
docker compose down # Stop all services
docker compose up -d # Start services in detached mode
docker compose scale server=5 # Scale Express instances dynamicallynginx -t # Test configuration for syntax errors
nginx -s reload # Reload config without downtimecaddy validate --config Caddyfile # Validate configuration
caddy reload --config Caddyfile # Reload config without downtimetraefik --configfile=traefik.yaml --dry-run # Validate static config
curl http://localhost:8080/api/rawdata | jq # Inspect live config via dashboard APIAfter running docker compose up, your Express app will be accessible through the proxy at http://localhost.
- All upstream instances are automatically registered
- Health checks are configured out of the box to skip unhealthy instances
- Logs are routed through Docker for easy inspection with
docker compose logs
Port 80 or 443 already in use?
Check if another web server is running on those ports, or update the port mappings in your compose.yaml.
502 Bad Gateway?
Your Express app instances may not be running or are listening on the wrong port. Verify the port in your compose.yaml matches your Express app's listen port.
Caddy not provisioning SSL automatically? Ensure your domain is publicly accessible and DNS is pointing to your server. Caddy requires a reachable domain for Let's Encrypt ACME challenges.
Interactive mode not working?
Make sure you're using the latest version: npm install -g @excli/proxy@latest
Need help? Open an issue on GitHub with details about your problem.
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
ISC License - see LICENSE file for details.
Noman
π§ pxycknomdictator@gmail.com
π @pxycknomdictator
Happy coding! Built with β€οΈ for developers who value productivity.