   req.key = key
   req.usr = apiKeys[key]
   req.db = app.get 'db'
+  req.cache = app.get 'cache'
 
   res.setHeader 'Access-Control-Allow-Origin', '*'
 

MongoClient.connect process.env.MONGO_URI, (err, db) ->
  return err if err
  app.set 'db', db

  if not module.parent
    app.listen app.get 'port'


express = require 'express'
raven   = require 'raven'

MongoClient = require('mongodb').MongoClient
redisClient = require('redis').createClient() # @TODO host + port

collection = require './collection'
document = require './document'
