{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/188","labels_url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/188/comments","events_url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/188/events","html_url":"https://github.com/pouchdb/express-pouchdb/issues/188","id":54239023,"number":188,"title":"Weird behavior when setting options","user":{"login":"gelnior","id":434526,"avatar_url":"https://avatars.githubusercontent.com/u/434526?v=3","gravatar_id":"","url":"https://api.github.com/users/gelnior","html_url":"https://github.com/gelnior","followers_url":"https://api.github.com/users/gelnior/followers","following_url":"https://api.github.com/users/gelnior/following{/other_user}","gists_url":"https://api.github.com/users/gelnior/gists{/gist_id}","starred_url":"https://api.github.com/users/gelnior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gelnior/subscriptions","organizations_url":"https://api.github.com/users/gelnior/orgs","repos_url":"https://api.github.com/users/gelnior/repos","events_url":"https://api.github.com/users/gelnior/events{/privacy}","received_events_url":"https://api.github.com/users/gelnior/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-13T19:49:48Z","updated_at":"2015-01-13T20:53:58Z","closed_at":"2015-01-13T20:53:58Z","body":"Hello there,\r\n\r\n  I'm trying to build an offline first app based on PouchDB. When I write my client side, everything is fine. \r\nBut on server side, things go wrong. What I try to do is to setup on the server side a PouchDB API that allows syncing between browsers. Here is how I setup Express-Pouch:\r\n\r\n```coffeescript\r\ndb = new PouchDB 'db'\r\nexpressPouchDB = require 'express-pouchdb'\r\napp.use '/db', expressPouchDB(db, mode: 'minimumForPouchDB')\r\n ```\r\n\r\nBut when I try to access to the API it says it cannot access to the database object. Are you sure of this code? https://github.com/pouchdb/express-pouchdb/blob/master/lib/index.js#L71-L75 \r\nIf yes, could you tell me what I do wrong?\r\n\r\nNode version: 0.10.26\r\nExpress version: 0.4.4\r\n\r\nHere is the stacktrace:\r\n\r\n```\r\nGET /db 500 1.816 ms - 3512\r\nError: express-pouchdb needs a PouchDB object to route a request!\r\n  at Layer.handle (.../node_modules/express-pouchdb/lib/index.js:174:13)\r\n  at trim_prefix (.../node_modules/express/lib/router/index.js:255:15)\r\n  at .../node_modules/express/lib/router/index.js:216:9\r\n  at Function.proto.process_params (.../node_modules/express/lib/router/index.js:284:12)\r\n  at next (.../node_modules/express/lib/router/index.js:207:19)\r\n  at Layer.expressInit [as handle] (.../hari/node_modules/express/lib/middleware/init.js:23:5)\r\n....\r\n```"},"comment":{"url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/comments/69817805","html_url":"https://github.com/pouchdb/express-pouchdb/issues/188#issuecomment-69817805","issue_url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/188","id":69817805,"user":{"login":"gelnior","id":434526,"avatar_url":"https://avatars.githubusercontent.com/u/434526?v=3","gravatar_id":"","url":"https://api.github.com/users/gelnior","html_url":"https://github.com/gelnior","followers_url":"https://api.github.com/users/gelnior/followers","following_url":"https://api.github.com/users/gelnior/following{/other_user}","gists_url":"https://api.github.com/users/gelnior/gists{/gist_id}","starred_url":"https://api.github.com/users/gelnior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gelnior/subscriptions","organizations_url":"https://api.github.com/users/gelnior/orgs","repos_url":"https://api.github.com/users/gelnior/repos","events_url":"https://api.github.com/users/gelnior/events{/privacy}","received_events_url":"https://api.github.com/users/gelnior/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T20:53:58Z","updated_at":"2015-01-13T20:53:58Z","body":"Ok my bad, it doesn't expect the db instance but the PouchDB object. Sorry for the noise."}}