Skip to content

mongo connector #11

Open
Open

Description

@ccgman123

@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 ?

Activity

  1. nponiros commented on Jan 20, 2018

    @nponiros
    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.

  2. ccgman123 commented on Jan 23, 2018

    @ccgman123
    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

  3. nponiros commented on Jan 23, 2018

    @nponiros
    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.

  4. nponiros commented on Jan 23, 2018

    @nponiros
    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.

  5. ccgman123 commented on Jan 26, 2018

    @ccgman123
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions