Skip to content

Instantly share code, notes, and snippets.

@wilkerlucio
Created May 7, 2014 17:47
Show Gist options
  • Save wilkerlucio/8e95c67323d808737350 to your computer and use it in GitHub Desktop.
Save wilkerlucio/8e95c67323d808737350 to your computer and use it in GitHub Desktop.
var express = require('express');
var path = require('path');
var app = express();
var directory = path.resolve(process.argv[2] || ".");
var port = process.argv[3] || 8888;
console.log("Serving", directory);
app.use('/', express.static(directory));
app.listen(port);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment