gj / fastify-ws

MIT License
55 stars 11 forks source link

Example #15

Open johntom opened 5 years ago

johntom commented 5 years ago

Hi, I used forked repo from https://github.com/oransel/fastify-simple-ws and while plugin loads I can't test for any sent messages using https://amritb.github.io/socketio-client-tool/. I have a public POC repo https://github.com/johntom/Fastify-Demo2 and any help with sockets much appreciated.

  1. resgistration in plugins/websocket.js everything at first seems fine but I had to change fastify.register(require('fastify-ws')) to fastify.register(require('fastify-simple-ws'))

  2. I try to publish message in services/hello.js but socket.on does not fire I've only used sockets in a sails,js app and a test with feathers.js so I don't have tons of experiance in this area as both frameworks made it very easy Thanks, John