Skip to content

Standalone Reverse Proxy Server with support for multiple routes using http-proxy. Define routes from multiple services in a configuration file and access them from a single endpoint. (NodeJS)

Notifications You must be signed in to change notification settings

jacobsauerhoefer/nodejs-reverse-proxy-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#ReverseProxy alt text Inspired by: https://memz.co/api-gateway-microservices-docker-node-js/

Description

Standalone Reverse Proxy Server with support for multiple routes using http-proxy. Define routes from multiple services in a configuration file and access them from a single endpoint.

Installation & Usage

#Install Node Modules from package.json
npm i

#Start Server
npm start or pm2 start ReverseProxy

Configuration

Define routes in a config.js file using the following format:

module.exports = routes = {
    'user': {
        apiRoute: '/api/user',
        upstreamUrl: '127.0.0.1:3000'
    },
    'books': {
        apiRoute: '/api/books',
        upstreamUrl: '127.0.0.1:3001'
    }
}

Class: ReverseProxyServer

About

Standalone Reverse Proxy Server with support for multiple routes using http-proxy. Define routes from multiple services in a configuration file and access them from a single endpoint. (NodeJS)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published