{"action":"opened","issue":{"url":"https://api.github.com/repos/strongloop/angular-live-set-example/issues/3","labels_url":"https://api.github.com/repos/strongloop/angular-live-set-example/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/angular-live-set-example/issues/3/comments","events_url":"https://api.github.com/repos/strongloop/angular-live-set-example/issues/3/events","html_url":"https://github.com/strongloop/angular-live-set-example/issues/3","id":97255757,"number":3,"title":"Persistence doesn't work when running gulp serve?","user":{"login":"acao","id":1368727,"avatar_url":"https://avatars.githubusercontent.com/u/1368727?v=3","gravatar_id":"","url":"https://api.github.com/users/acao","html_url":"https://github.com/acao","followers_url":"https://api.github.com/users/acao/followers","following_url":"https://api.github.com/users/acao/following{/other_user}","gists_url":"https://api.github.com/users/acao/gists{/gist_id}","starred_url":"https://api.github.com/users/acao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acao/subscriptions","organizations_url":"https://api.github.com/users/acao/orgs","repos_url":"https://api.github.com/users/acao/repos","events_url":"https://api.github.com/users/acao/events{/privacy}","received_events_url":"https://api.github.com/users/acao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-25T20:50:53Z","updated_at":"2015-07-25T20:50:53Z","closed_at":null,"body":"So I wanted to experiment with performance using a persistent datasource - Mongodb.\r\n\r\nI tried just swapping out db in server/datasources.json, however I was given this error:\r\n\r\n```js\r\n{\"error\":{\"name\":\"MongoError\",\"status\":500,\"message\":\"topology was destroyed\" ..}\r\n```\r\n\r\nSo - I did a few config changes to 'decouple' the application.\r\n\r\n1. installed loopback-connector-mongodb\r\n1. edited gulpfile.js to pass a full server apiUrl param to gulp-loopback-angular-sdk\r\n1. appended the server api url to the new EventSource call in circle.controller.js\r\n1. edited the mongo datasource config for better realtime performance\r\n1. enabled cors\r\n\r\nThen I ran in two console tabs - a ``node .`` for the server, and then a simple static server for the dist/ folder.\r\n\r\nIt worked! A bit slower than the memory datasource of course, but it was impressive.\r\n\r\nBut I can't seem to figure out why mongodb datasource isn't working with the default gulp config. Any thoughts on this?"}}