Skip to content

Instantly share code, notes, and snippets.

@brnacl
brnacl / app.js
Last active July 27, 2023 20:03
Host multiple Node.js apps on single ubuntu server
var httpProxy = require('http-proxy');
var options = {
router: {
'example.com': '127.0.0.1:3000',
'example.com/site1': '127.0.0.1:3000'
}
};
var proxyServer = httpProxy.createServer(options);