UNPKG

hermesjs-socketio

Version:

WebSockets adapter for HermesJS. Powered by Socket.IO.

15 lines (13 loc) 402 B
<html> <body> <p>Open the browser console to see more details.</p> <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.3.0/socket.io.js"></script> <script> const socket = io('http://localhost:3000/', { path: '/ws' }); socket.emit('trip__requested', 'test'); socket.on('trip__accepted', (event) => { console.log('Trip accepted'); }); </script> </body> </html>