blob: 6a7e8b02ec1671a2d690e1798f17142519ec79a9 [file] [log] [blame]
Matteo Scandoloc80ccbd2017-02-27 16:24:33 -08001const httpProxy = require('http-proxy');
2
3const proxy = httpProxy.createProxyServer({
Matteo Scandolo042ea632017-03-01 19:02:34 -08004 target: 'http://192.168.46.100:9101'
Matteo Scandoloc80ccbd2017-02-27 16:24:33 -08005});
6
7proxy.on('error', function(error, req, res) {
8 res.writeHead(500, {
9 'Content-Type': 'text/plain'
10 });
11 console.error('[Proxy]', error);
12});
13
14module.exports = proxy;