Skip to content

Instantly share code, notes, and snippets.

View jasonlally's full-sized avatar

Jason Lally jasonlally

View GitHub Profile
@gouldingken
gouldingken / nodesubdomains
Last active December 15, 2015 09:19
Node.js routing subdomains to folders with node-static
var _subServants = {};
var _addSubdomainDir = function (subdomain, relativePath) {
var cliPath = path.resolve(__dirname, relativePath);
_subServants[subdomain] = new (nodeStatic.Server)(cliPath);
};
var _init = function () {
_addSubdomainDir('brown', 'client/branches/brown');
_addSubdomainDir('green', 'client/branches/green');