Skip to content

Instantly share code, notes, and snippets.

View UniDyne's full-sized avatar

D. Oliver Brown UniDyne

View GitHub Profile
@UniDyne
UniDyne / static_server.js
Last active March 27, 2016 16:41 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
// this could be stored in a json file instead
var mimetypes = {
css: "text/css",
gif: "image/gif",