Hello,
I have a Mojito application and an Apache application. I want to proxy some paths from the Mojito application to the Apache application. I want to use http-proxy, but I do not know in which file to start the proxy server. In Express, it would be app.js. My code for creating a proxy looks like this:
var http = require('http'),
httpProxy = require('http-proxy');
httpProxy.createServer({
hostnameOnly: true,
router: {
'localhost:8001': 'localhost:8666',
'localhost:8001/path': 'localhost:8080'
}
}).listen(8001);
Which file should I put this code in? Is this the best way to do this? Does Mojito have its own way of proxying?