chat-sdk-javascript
chat-sdk-javascript copied to clipboard
Is it possible to use this SDK with a node.js application directly.
The problem
Unable to use this SDK from Node.js
What was the expected behavior?
To be able to hit the Comet Chat API from my API directly to create users/keep track of their tokens in my DB.
Reproduction
- Install this library to a node.js codebase
- you will get the error
ReferenceError: window is not defined at Object.<anonymous>
node_modul ││ es/@cometchat/chat-sdk-javascript/CometChat.js:1:224)
- Version used: Latest
- Other modules/plugins/libraries that might be involved: Strapi.js
Rosanne Fernando (CometChat Team) replied:
Hello there,
Thanks for reaching out with your concern. I am Rosanne from the Support team.
Happy to help you. Can you please elaborate more on the issue you are facing and what exactly you are trying to achieve? Additionally, can you specify the version of the JavaScript SDK you are using so that we can investigate this further?
Regards.
Rosanne Fernando CometChat