Skip to content

Instantly share code, notes, and snippets.

@thinkjson
Created May 11, 2011 15:54
Show Gist options
  • Select an option

  • Save thinkjson/966731 to your computer and use it in GitHub Desktop.

Select an option

Save thinkjson/966731 to your computer and use it in GitHub Desktop.
Static file server in Node.js
var express = require('express');
var app = express.createServer();
app.use(express.static(__dirname));
app.listen(parseInt(process.ARGV[2], 10) || 8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment