xcarve-proxy
Version:
A Node.js proxy server for connecting to a Raspberry Pi that is running xcarve-server.
13 lines (10 loc) • 316 B
JavaScript
var util = require('util'),
httpProxy = require('http-proxy'),
host = (process.platform === 'win32' ? 'xcarve' : 'xcarve.local'),
port = 1338;
var server = httpProxy.createServer({
target: 'ws://' + host + ':' + port,
ws: true
});
server.listen(port);
process.on('uncaughtException', console.log);