simple-socket-router
Simple express-like socket routing for websockets, event emitters and socket.io
This is a simple way to avoid having to write a bunch of event.on
handlers for larger applications. You can simply define routes and pass in your event emitter/websocket/socket.io(client|sever) and handle routes that way
Example
This works for both socket servers and clients
// SERVER CODE;;const ioServer = ;// Router - npm module 'routes';const router = ;router;router
// Client CODE;;const socket = ;// Router - npm module 'routes';const router = ;router; socket