0.0.14 • Published 10 years ago

node-http-gateway v0.0.14

Weekly downloads
2
License
BSD-2-Clause
Repository
-
Last release
10 years ago

node-http-gateway

To expose internal http/websocket service to external network via authed http/https

Install

npm install node-http-gateway

Usage

Gateway = require("node-http-gateway")
Route = Gateway.Route

# if key and cert are provided we use https/wss
# else we use http/ws
gateway = new Gateway({username:"username",password:"password",port:8080,key:"./key.pem",cert:"./cert.pem"})
gateway.addRoute new Route("all","/someone","http://localhost:1080/")
gateway.addRoute new Route("all","/musics","http://localhost:1081/")

gateway.listen()
gateway.on "ready",()=>
    console.log "gateway is running"

# vists http://externalip/someone should proxy to http://localhost:1080/ 
# vists http://externalip/someone/abc should proxy to http://localhost:1080/abc
# same applies to websockets
# etc..
0.0.14

10 years ago

0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago