jszmq
jszmq copied to clipboard
problem: no browser test
I cannot find a way to test from browser as I also need to test from nodejs for the server. Ideas are welcome
I'd actually be interested in offering to adapt a small test app I made using this library for use as an example app and as an integration test. I built it as an experiment for developing larger parts of the app, and I've been so happy with ZeroMQ, I think we'll be moving forward with the larger project. The experiment will likely go unused in its current form, so I'd be happy to donate it to this project.
I was thinking something along these lines:
For the NodeJS API: https://github.com/ProDataLab-Community/Component-Editor/blob/19da651d86488b9871255f641b03fe72126e93bf/src/api/index.ts
This is the view:
https://github.com/ProDataLab-Community/Component-Editor/blob/19da651d86488b9871255f641b03fe72126e93bf/src/web/views/Chat.tsx
And here are the serialization functions:
https://github.com/ProDataLab-Community/Component-Editor/blob/19da651d86488b9871255f641b03fe72126e93bf/src/lib/interfaces.ts
NOTE: I'm still having trouble with the serialization functions using MessagePack, I think there's a small encoding difference, but I'm not 100% sure what it is just yet. There is a working version of this app I'm temporarily hosting here:
http://104.131.40.55/chat
All the React, Express, and Cypress stuff would be heavy, but we'd just have to be careful to be sure to set NODE_ENV to production so that devDependencies don't get pushed to NPM, of course.
We can put it under example directory with its own package.json and can run the example as part of the CI?
That way we wouldn't need to add React or Express to the current package.json
That's a good point, and a very good idea!
Please let's also have a simple javascript example as well without any react/typescript/bloat. Just something directly runable by a browser