socket.io-compose

compose Socket.IO middleware

Usage no npm install needed!

<script type="module">
  import socketIoCompose from 'https://cdn.skypack.dev/socket.io-compose';
</script>

README

const compose = require("socket.io-compose");
const awesomeMiddleware = require("awesome-middleware");
const amazingMiddleware = require("amazing-middleware");
const awesomeAmazingMiddleware = compose(awesomeMiddleware, amazingMiddleware);

io.use(awesomeAmazingMiddleware);