Official SDK for TypeScript - GitHub - NPM registry
If you want to connect to your Neoroute server from NodeJS or the browser, you can follow this guide on how to install the official SDK. Actual functionality and usage is explained in the relevant pages under the Client category of the documentation.
We, ourselves, only test this SDK with TypeScript since that’s what we use. However, you should also be able to get it to work in JavaScript.
You literally just install the package.
npm install @liphium/neoroute-ts
For how to actually connect, follow the WebSocket or HTTP page.
Config object you give to a Client. The string you return there is packaged into a UserError, the object returned by almost all send functions.We have some examples available in the GitHub repository. They’re mostly ported over from the Go side of things, meaning you need to run the server from the Go examples to actually be able to test them out.
Guides for how to run them are available in the README of all the examples.
We verified that the browser and NodeJS both work without problems in our tests. The only dependency we have is MessagePack, the encoding we use instead of JSON.
Other than that, we use the native Browser APIs like fetch and WebSocket. For this reason, there should not be any issues. If you still find an environment that has problems or there is something wrong with our SDK, please kindly let us know on GitHub.