   else
     @redirect altPath
 
+get '/error', ->
+  throw new Error('Foo')
+
 # list teams
 get '/teams', ->
   Team.all (error, teams) =>

app.use connect.bodyDecoder()
app.use connect.methodOverride()
app.use connect.cookieDecoder()

app.enable 'show exceptions'

request = (type) ->
  (path, fn) ->

      n + ' ' + str + 's'
}

Hoptoad = require('./lib/hoptoad-notifier/lib/hoptoad-notifier').Hoptoad;
Hoptoad.key = 'b76b10945d476da44a0eac6bfe1aeabdk';
app.error (err, req, res, next) ->
  Hoptoad.notify(err);
  next(err)

app.use('/', connect.errorHandler({ dumpExceptions: true, showStack: true }));

server = app.listen parseInt(process.env.PORT || 8000), null
