Skip to content

Instantly share code, notes, and snippets.

@jimCresswell
Created October 27, 2013 17:09
Show Gist options
  • Select an option

  • Save jimCresswell/7185108 to your computer and use it in GitHub Desktop.

Select an option

Save jimCresswell/7185108 to your computer and use it in GitHub Desktop.
static, local node server
// Static node server
// package.json fragment
// "devDependencies": {
// "http-server": "",
// "express": ""
// }
var express = require('express'),
http = require('http');
var app = express()
.use(express.static(__dirname));
http.createServer(app).listen(3000, function () {
console.log("Server ready at http://localhost:3000");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment