Skip to content

Instantly share code, notes, and snippets.

@andrewschaaf
Created September 14, 2011 23:37
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 andrewschaaf/1218123 to your computer and use it in GitHub Desktop.
Save andrewschaaf/1218123 to your computer and use it in GitHub Desktop.
module.exports = (app) ->
r = app.redis
db = app.db
app.get '/', (req, res, next) ->
res.render 'index'
app.get '/foo', (req, res, next) ->
res.render 'foo'
app = express.createServer
...
app.db = ...
app.redis = ...
require('./app')(app)
app.listen ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment