Skip to content

@FLYBYME /gist:1327138
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
var bouncy = require('bouncy');
module.exports = function(evn) {
bouncy(function(req, bounce) {
try {
if(evn.domains.hasOwnProperty(req.headers.host)) {
bounce(evn.domains[req.headers.host].port);
} else if(evn.cdn.hosts.hasOwnProperty(req.headers.host)) {
bounce(evn.cdn.hosts[req.headers.host].port);
}
} catch(err) {
console.log(err)
}
}).listen(evn.masterPort);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.