Skip to content

Instantly share code, notes, and snippets.

@spinweb-dev
Created April 7, 2014 14:42
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 spinweb-dev/10021620 to your computer and use it in GitHub Desktop.
Save spinweb-dev/10021620 to your computer and use it in GitHub Desktop.
var express = require('express'),
http = require('http'),
app = express(),
server = http.createServer(app)
app.use(express.static(__dirname + '/build'));
app.get('/', function(req, res) {
res.send({});
});
app.use(
function(err, req, res, next){
console.error(err.stack);
res.send(500);
}
);
exports = module.exports = server;
exports.use = function() {
app.use.apply(app, arguments);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment