loopback-example-angular-live-set icon indicating copy to clipboard operation
loopback-example-angular-live-set copied to clipboard

Mongodb persistence doesn't work when running gulp serve?

Open acao opened this issue 11 years ago • 3 comments

So I wanted to experiment with performance using a persistent datasource - Mongodb.

I tried just swapping out db in server/datasources.json and installing the mongo connector, however I was given this error:

{"error":{"name":"MongoError","status":500,"message":"topology was destroyed" ..}

So - I did a few config changes to 'decouple' the application.

  1. edited gulpfile.js to pass a full server apiUrl param to gulp-loopback-angular-sdk
  2. appended the server api url to the new EventSource call in circle.controller.js
  3. edited the mongo datasource config for better realtime performance
  4. enabled cors

Then I ran in two console tabs - a node . for the server, and then a simple static server for the dist/ folder.

It worked! A bit slower than the memory datasource of course, but it was impressive.

But I can't seem to figure out why mongodb datasource isn't working with the default gulp config. Any thoughts on this?

acao avatar Jul 25 '15 20:07 acao

Please provide a sample repo for me to reproduce this issue: See link: https://github.com/strongloop/loopback/wiki/Reporting-issues#bug-report

0candy avatar Nov 18 '15 18:11 0candy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 23 '17 14:08 stale[bot]

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

stale[bot] avatar Sep 06 '17 14:09 stale[bot]