Skip to content

Instantly share code, notes, and snippets.

@mikeobrien
Created October 26, 2013 17:47
Show Gist options
  • Save mikeobrien/7172456 to your computer and use it in GitHub Desktop.
Save mikeobrien/7172456 to your computer and use it in GitHub Desktop.
var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send('<html><body>oh hai</body></html>');
}).listen(3091);
var http = require("http"),
url = require("url");
http.createServer(function(req, res) {
switch (url.parse(req.url).pathname) {
case "/":
res.writeHead(200, { "Content-Type": "text/html" });
res.write('<html><body>oh hai</body></html>')
break;
default: res.writeHead(404);
}
res.end();
}).listen(3091);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment