Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongo connector #11

Open
ccgman123 opened this issue Jan 19, 2018 · 5 comments
Open

mongo connector #11

ccgman123 opened this issue Jan 19, 2018 · 5 comments

Comments

@ccgman123
Copy link

@nponiros
So the server seems to boot and work well with the samples included. The only change I had to make so far was in the changes_table.js. I kept getting an error when trying to boot the server telling me that
this.store.find(query).sort({ rev: 1 }).exec()
is not a function. so i swapped the function with
this.store.find(query).sort({ rev: 1 }).toArray()
seems to work just fine.

Does your syn-client package have a web small website example to test ?

@nponiros
Copy link
Owner

Good to hear.

https://github.com/nponiros/bookmarks_manager uses the sync-client but it is not really a small example. Files under the actions folder use the sync-client. The sync-client itself is initialized the the db folder.

@ccgman123
Copy link
Author

@nponiros thanks. Would the sync client package work with angular 4+ ? I have followed the same pattern from your dexie angular example from a year ago.

`
import { Injectable } from '@angular/core';
import SyncClient from 'sync-client';

@Injectable()
export class DexieService extends SyncClient {
constructor () {
super('Logbook', [{
version: 1,
stores: {
test: '_id'
}
}]);
}
}
`
When I use this pattern the project compiles however when I run in the browser I errors in zone.js.

Thanks

@nponiros
Copy link
Owner

Generally speaking there is no reason why the sync-client shouldn't be able to work with angular. What you are experiencing is probably this dexie issue. The sync-client still uses a rather old version of dexie. I will try to update it today.

@nponiros
Copy link
Owner

I published 1.0.0-beta.10 of sync-client with the latest dexie versions. Check that out and let me know if the issue is fixed.

@ccgman123
Copy link
Author

That was exactly the error I was getting. It works now. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants