Skip to content

Instantly share code, notes, and snippets.

@jackmaney
Created September 1, 2013 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackmaney/6402257 to your computer and use it in GitHub Desktop.
Save jackmaney/6402257 to your computer and use it in GitHub Desktop.
Finding subdomains via Node and Express
var express = require("express");
var app = express();
app.all("/",function(req,res){
res.writeHead(200,{"Content-Type":"text/plain"});
res.end(req.headers.host);
});
app.listen(3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment