Skip to content

Instantly share code, notes, and snippets.

@shams-ali
Created June 25, 2016 04:21
Show Gist options
  • Save shams-ali/62d41869cc391cd51d5962359992b587 to your computer and use it in GitHub Desktop.
Save shams-ali/62d41869cc391cd51d5962359992b587 to your computer and use it in GitHub Desktop.
Express Proxy Server
var app = require('express')();
var requestProxy = require('express-request-proxy');
app.get('/', function(req, res) {
res.sendFile(__dirname + '/index.html');
});
app.post('/api/webhooks/:channel', requestProxy({
url: 'http://google.mvargeson.ultrahook.com/api/webhooks/:channel'
}));
app.listen(process.env.PORT || 9000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment