   hostname: '127.0.0.1'
   port: 27017
   mongoOptions: {auto_reconnect: true}
-}
+
 
 # Valid options as above.
 module.exports = MongoDb = (options) ->

      
  # Data = {v, snapshot, type}. Error if the document doesn't exist.
  @getSnapshot = (docName, callback) ->
    checkIndex ->
      client.collection 'docs', (err, collection) ->
        return callback? err if err
      

  # end can be null. If so, returns all documents from start onwards.
  # Each document returned is in the form {op:o, meta:m, v:version}.
  @getOps = (docName, start, end, callback) ->
    checkIndex (err) ->
      return callback? err if err
      if start == end
        callback null, []
        return
