WebSocket extension for ThinkJS 3.x framework. Current stable version is 1.0.8, with a maintenance status and low release cadence. It integrates WebSocket server capabilities into ThinkJS controllers, supporting events like open, close, message, and error. Unlike standalone WebSocket libraries, this is tightly coupled with ThinkJS's app lifecycle, requiring access to think.app during configuration. The package ships TypeScript definitions and requires Node.js >= 6.0.0.
npm install think-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures the WebSocket extension in ThinkJS and shows basic open/close/message event handling in a controller.
Evaluate migration to ThinkJS 4 or use a standalone WebSocket library like ws.
Ensure you pass think.app: websocket(think.app)
Do not try to import/use this package outside of ThinkJS.
const websocket = require('think-websocket');
module.exports = [
websocket(think.app)
];Only use this in ThinkJS config files where think is globally available.
Verify that think-websocket is enabled in extend configuration and ThinkJS server is running.
No dependency data recorded yet.