{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails/issues/2987","labels_url":"https://api.github.com/repos/balderdashy/sails/issues/2987/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails/issues/2987/comments","events_url":"https://api.github.com/repos/balderdashy/sails/issues/2987/events","html_url":"https://github.com/balderdashy/sails/issues/2987","id":84264006,"number":2987,"title":"Support connect-waterline as a session store","user":{"login":"dbkaplun","id":1765130,"avatar_url":"https://avatars.githubusercontent.com/u/1765130?v=3","gravatar_id":"","url":"https://api.github.com/users/dbkaplun","html_url":"https://github.com/dbkaplun","followers_url":"https://api.github.com/users/dbkaplun/followers","following_url":"https://api.github.com/users/dbkaplun/following{/other_user}","gists_url":"https://api.github.com/users/dbkaplun/gists{/gist_id}","starred_url":"https://api.github.com/users/dbkaplun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbkaplun/subscriptions","organizations_url":"https://api.github.com/users/dbkaplun/orgs","repos_url":"https://api.github.com/users/dbkaplun/repos","events_url":"https://api.github.com/users/dbkaplun/events{/privacy}","received_events_url":"https://api.github.com/users/dbkaplun/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/balderdashy/sails/labels/feature","name":"feature","color":"207de5"},{"url":"https://api.github.com/repos/balderdashy/sails/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-02T23:37:55Z","updated_at":"2015-06-03T20:18:49Z","closed_at":null,"body":"https://github.com/dmarcelino/connect-waterline"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails/issues/comments/108603052","html_url":"https://github.com/balderdashy/sails/issues/2987#issuecomment-108603052","issue_url":"https://api.github.com/repos/balderdashy/sails/issues/2987","id":108603052,"user":{"login":"dmarcelino","id":1280446,"avatar_url":"https://avatars.githubusercontent.com/u/1280446?v=3","gravatar_id":"","url":"https://api.github.com/users/dmarcelino","html_url":"https://github.com/dmarcelino","followers_url":"https://api.github.com/users/dmarcelino/followers","following_url":"https://api.github.com/users/dmarcelino/following{/other_user}","gists_url":"https://api.github.com/users/dmarcelino/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarcelino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarcelino/subscriptions","organizations_url":"https://api.github.com/users/dmarcelino/orgs","repos_url":"https://api.github.com/users/dmarcelino/repos","events_url":"https://api.github.com/users/dmarcelino/events{/privacy}","received_events_url":"https://api.github.com/users/dmarcelino/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T20:18:49Z","updated_at":"2015-06-03T20:18:49Z","body":"My earlier instructions are to re-use sails waterline instance, if you want something simpler, you can do:\r\n\r\n```js\r\nvar WaterlineStore = require('connect-waterline');\r\n\r\nvar options = {\r\n  adapters: {\r\n    'default': require('sails-disk')  // or any other sails adapter\r\n  },\r\n  connections: {\r\n    'connect-waterline': {\r\n      adapter: 'default'\r\n      // specific adapter connection options\r\n      // user: '',\r\n      // password: '',\r\n      // host: 'localhost',\r\n      // database: 'sessions'\r\n    }\r\n  }\r\n})\r\n\r\napp.use(session({\r\n  secret: 'foo',\r\n  store: new WaterlineStore(options);\r\n}));\r\n```\r\n\r\nThis way `connect-waterline` will create its own instance of waterline. You still have to pass the Adapter and any connection details."}}