Skip to content

Instantly share code, notes, and snippets.

@deltaepsilon
Created June 3, 2013 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deltaepsilon/5700078 to your computer and use it in GitHub Desktop.
Save deltaepsilon/5700078 to your computer and use it in GitHub Desktop.
static file server
var express = require('express'),
app = express(),
conf = require('./convict.conf.js');
console.log(conf.get('env'));
app.use(function(req, res, next) {
console.log('%s %s', req.method, req.url);
next();
});
app.use('/', express.static(__dirname + '/app'));
app.listen(conf.get('port'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment