-
Notifications
You must be signed in to change notification settings - Fork 55
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
How to enable nodejs support #23
Comments
Official support would be great. |
@nikitaosyak thanks.
thow an err i try to |
Any update on this ? Current hack to make it work: npm i es6-promise isomorphic-fetch url-search-params ws btoa atob
sed -i "2i require('es6-promise').polyfill()\nrequire('isomorphic-fetch')\nvar btoa = require('btoa')\nvar atob = require('atob')\nconst URLSearchParams = require('url-search-params')\nvar WebSocket = require('ws')\nvar self = {}" node_modules/@heroiclabs/nakama-js/dist/nakama-js.cjs.js |
@louis030195 At the moment we don't have plans to provide compatibility with Node. The current client uses its dependency tree carefully to ensure it will load in Google Instant, Snap Games, and Facebook Instant Games webview environments on mobile browsers. Would be happy to look at a pull request which does not break these environments at build or package time and introduces Node support if you have the time? |
And old thread but it got me on the right track to add nakamajs into a command line node project. Here is the updated code to add to the top of najama-js.cjs.js
And here is an example of how to setup your calls to the client
Finally the package.json file
|
The text was updated successfully, but these errors were encountered: