Skip to content

Instantly share code, notes, and snippets.

View ksnabb's full-sized avatar

Kristoffer Snabb ksnabb

  • Reaktor Innovations
  • Helsinki, Finland
View GitHub Profile
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);