sync_server
sync_server copied to clipboard
mongo connector
@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 ?
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.
@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
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.
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.
That was exactly the error I was getting. It works now. Thanks