Handy for when working on single-page apps
- Copy server.js to your project
npm install express
node ./server
var express = require('express') | |
, app = express() | |
, path = __dirname + (process.argv[2] || './') | |
, port = process.argv[3] || 3000 | |
app.use(express.static(path)); | |
app.listen(port, function() { console.log('Listening on port '+port+' serving files from '+path) }); |