{"action":"created","issue":{"url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-mongodb/issues/105","repository_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-mongodb","labels_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-mongodb/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-mongodb/issues/105/comments","events_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-mongodb/issues/105/events","html_url":"https://github.com/feathersjs-ecosystem/feathers-mongodb/issues/105","id":284734376,"number":105,"title":"Gettting Page not found, Initial connect to db do not work?","user":{"login":"Shadowman4205","id":23194476,"avatar_url":"https://avatars2.githubusercontent.com/u/23194476?v=4","gravatar_id":"","url":"https://api.github.com/users/Shadowman4205","html_url":"https://github.com/Shadowman4205","followers_url":"https://api.github.com/users/Shadowman4205/followers","following_url":"https://api.github.com/users/Shadowman4205/following{/other_user}","gists_url":"https://api.github.com/users/Shadowman4205/gists{/gist_id}","starred_url":"https://api.github.com/users/Shadowman4205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shadowman4205/subscriptions","organizations_url":"https://api.github.com/users/Shadowman4205/orgs","repos_url":"https://api.github.com/users/Shadowman4205/repos","events_url":"https://api.github.com/users/Shadowman4205/events{/privacy}","received_events_url":"https://api.github.com/users/Shadowman4205/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-27T14:34:13Z","updated_at":"2017-12-27T21:16:57Z","closed_at":null,"author_association":"NONE","body":"Hello, i tried using this plugin with no succes\r\n\r\ni have got this function\r\n\r\n```\r\nconst service =  function() {\r\n  const app = this;\r\n  \r\n  MongoClient.connect(\"mongodb://localhost:27017/feathers\").then(client => {\r\n    const db = client.db(\"EaCms\");\r\n    app.use(\r\n      \"/news\",\r\n      service({\r\n        Model: db.collection(\"news\")\r\n      })\r\n    );\r\n  });\r\n}\r\n\r\nconst app = feathers()\r\n\r\napp\r\n  .configure(hooks())\r\n  .configure(rest())\r\n  .configure(service)\r\n  .configure(middleware);\r\n\r\nexport deafault app;\r\n```\r\n\r\nand i am getting\r\n\r\n```\r\n{\r\n    \"name\": \"NotFound\",\r\n    \"message\": \"Page not found\",\r\n    \"code\": 404,\r\n    \"className\": \"not-found\",\r\n    \"errors\": {}\r\n}\r\n```\r\ni tried doing this - commenting the connect part\r\n\r\n```\r\nconst service =  function() {\r\n  const app = this;\r\n  /*\r\n MongoClient.connect(\"mongodb://localhost:27017/feathers\").then(client => {\r\n    const db = client.db(\"EaCms\");\r\n    app.use(\r\n      \"/news\",\r\n      service({\r\n        Model: db.collection(\"news\")\r\n      })\r\n    );\r\n  });*/\r\n \r\n app.use(\"/testmongdb\", function(req, res) {\r\n    res.send(JSON.stringify(true));\r\n  });\r\n}\r\n```\r\nand i get the true response.\r\n\r\nhow use this  plugin? what am i missing? is it because of connect that is async?\r\n"},"comment":{"url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-mongodb/issues/comments/354178873","html_url":"https://github.com/feathersjs-ecosystem/feathers-mongodb/issues/105#issuecomment-354178873","issue_url":"https://api.github.com/repos/feathersjs-ecosystem/feathers-mongodb/issues/105","id":354178873,"user":{"login":"Shadowman4205","id":23194476,"avatar_url":"https://avatars2.githubusercontent.com/u/23194476?v=4","gravatar_id":"","url":"https://api.github.com/users/Shadowman4205","html_url":"https://github.com/Shadowman4205","followers_url":"https://api.github.com/users/Shadowman4205/followers","following_url":"https://api.github.com/users/Shadowman4205/following{/other_user}","gists_url":"https://api.github.com/users/Shadowman4205/gists{/gist_id}","starred_url":"https://api.github.com/users/Shadowman4205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shadowman4205/subscriptions","organizations_url":"https://api.github.com/users/Shadowman4205/orgs","repos_url":"https://api.github.com/users/Shadowman4205/repos","events_url":"https://api.github.com/users/Shadowman4205/events{/privacy}","received_events_url":"https://api.github.com/users/Shadowman4205/received_events","type":"User","site_admin":false},"created_at":"2017-12-27T21:16:57Z","updated_at":"2017-12-27T21:16:57Z","author_association":"NONE","body":"@daffl  you said something about  after connection, what do you mean, cause as i stated in the post i am doing it. "}}
{"actor":{"display_login":"Shadowman4205"}}