Created
May 7, 2014 17:47
-
-
Save wilkerlucio/8e95c67323d808737350 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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