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

Version 4 is broken #7

Open
samuelkilada opened this issue Oct 12, 2017 · 4 comments
Open

Version 4 is broken #7

samuelkilada opened this issue Oct 12, 2017 · 4 comments

Comments

@samuelkilada
Copy link

Thanks for making this useful library. I see that version 4 was just released a day ago. I wanted to let you know that it is broken. A simple:

const shareDbAccess = require('sharedb-access');

...will break it. I switched to 3.0.0 and it's working fine. The error:

error: uncaughtException: Unexpected token function

@minicuper
Copy link
Contributor

minicuper commented Oct 13, 2017

which version of node are you using? Does it support anync/await?

@samuelkilada
Copy link
Author

6.11.3. It might not support it, not sure. I should mention that even with version 3, it doesn't seem to work for me. I'm not using Derby, just straight shareDB. I tried:

const shareDbAccess = require('sharedb-access')

var backend = new ShareDB({db: db}); // {db}
var connection = backend.connect();
shareDbAccess(backend)


backend.allowRead('items', function (docId, doc, session)  {
  // Allow all operations
  return true
})

Never allows any client to access the data, though.

@minicuper
Copy link
Contributor

Do you have a simple project to check?

@samuelkilada
Copy link
Author

samuelkilada commented Oct 13, 2017

Not really simple unfortunately. :P Would be awesome to have an example on this repo, but I know that takes time. An example without Derby, just this library used by itself.

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