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

[realtime] does not work in nodejs environment #393

Open
doubleface opened this issue Apr 19, 2019 · 2 comments
Open

[realtime] does not work in nodejs environment #393

doubleface opened this issue Apr 19, 2019 · 2 comments

Comments

@doubleface
Copy link
Contributor

doubleface commented Apr 19, 2019

I tried to use cozy-realtime in nodejs for a connector and here is the message I received :

ReferenceError: WebSocket is not defined

Here is the test code in the dummy connector : https://github.com/konnectors/dummy/blob/realtime_test/src/index.js

@ptbrowne ptbrowne changed the title [realtime] does not works in nodejs environment [realtime] does not work in nodejs environment Apr 19, 2019
@ptbrowne
Copy link
Contributor

I don't think realtime was ever supposed to work in NodeJS. I think you would need to polyfill global.WebSocket for that. There must be libraries to do that. I am curious about the usecase ?

@doubleface
Copy link
Contributor Author

The goal was to check account changes in the connector for 2FA. But this in not blocking.

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