Monday, 1 October 2018

Looking for help with Nodejitsu

I am trying to use Nodejitsu as a reverse proxy inside an express app which should be pretty straight forward, using nginx I only have to configure proxy_pass http:///192.168.0.100:3000 and everything works as expected, not having any luck with express/nodejitsu, any help would be appreciated​// reverse proxyvar httpProxy = require('http-proxy');var revProxy = httpProxy.createProxyServer();var internalapp = 'r/http://192.168.0.100:3000';app.all("/app",function(req, res) {    console.log(req.method + ' : ' + req.url);    req.url = req.url.replace('/app','');    revProxy.web(req, res, {                target: internalapp                });});

Submitted October 01, 2018 at 10:17PM by DarthLurker

No comments:

Post a Comment