Socket.io adapter for the ThinkJS framework (v1.0.x, last updated 2020). Use it to integrate Socket.io WebSocket into ThinkJS applications. Configurable path, allowOrigin, adapter (e.g., socket.io-redis for multi-node). Supports emit and broadcast actions. Designed for ThinkJS v2.x/v3.x. Low maintenance; consider alternatives for new projects.
npm install think-websocket-socket.ioNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configure ThinkJS to use socket.io for WebSocket with custom messages and sticky cluster.
Consider using socket.io directly with ThinkJS or migrate to a newer framework.
Add 'stickyCluster: true' to src/config/config.js.
Use 'const socketio = require('think-websocket-socket.io');' and set '{ handle: socketio }'.Use require() or import * as ns syntax.
Pass adapter instance as shown in docs; cannot change after server start.
Use 'handle: socketio' in config, not 'socketio()'.
Set stickyCluster: true in config.js or use environment variable PORT.
Run 'npm install think-websocket-socket.io' (ensure socket.io is also installed).