Skip to content

Instantly share code, notes, and snippets.

@nicinabox
Created April 12, 2015 16:15
Show Gist options
  • Save nicinabox/1cca035f391f4d75d5bc to your computer and use it in GitHub Desktop.
Save nicinabox/1cca035f391f4d75d5bc to your computer and use it in GitHub Desktop.
A handy server to use in development
var connect = require('connect')
var http = require('http')
var serveStatic = require('serve-static')
var PORT = 8000;
var app = connect()
app.use(serveStatic(__dirname + '/public'))
app.use(serveStatic(__dirname))
http.createServer(app).listen(PORT)
console.log('Server is running on port ' + PORT);
@nicinabox
Copy link
Author

npm install -D connect serveStatic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment