Skip to content

Instantly share code, notes, and snippets.

@killfill
Created August 26, 2011 18:07
Show Gist options
  • Save killfill/1174001 to your computer and use it in GitHub Desktop.
Save killfill/1174001 to your computer and use it in GitHub Desktop.
var express = require('express');
var app = module.exports = express.createServer();
app.configure(function(){
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(__dirname + '/public'));
});
app.configure('development', function(){
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});
app.configure('production', function(){
app.use(express.errorHandler());
});
// Routes
app.get('/', function(req, res){
res.send('hola!');
});
app.get('/mu-21ece4e3-160fdbfd-a2846b96-7c92bedb', function(req, res) {
res.send('42');
});
app.listen(10260);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment