Created
May 30, 2014 12:09
-
-
Save srom/7967d2401b19ccb906fb to your computer and use it in GitHub Desktop.
Express.js boilerplate. Useful for quickly firing up a local web server.
This file contains hidden or 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 app = express(); | |
// config | |
app.use(express.logger()); // log requests | |
app.use(express.favicon()); // default favicon | |
app.use(express.static(__dirname + '/static')); // handle static files | |
// start | |
var port = process.env.PORT || 3000; | |
app.listen(port); | |
console.log('listening on port ' + port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment