WebSocket server plugin for the Architect framework, supporting multiplexed channels (e.g., printer, chatroom) and route mounting via SockJS. Version 1.2.0 is the latest stable release; the package appears to be in maintenance mode with no recent updates. It integrates tightly with Architect's plugin system and exposes an `imports.wsserver` object for route registration. Unlike standalone WebSocket libraries, this is specifically designed as an Architect plugin and requires the Architect runtime.
npm install architect-websocket-serverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates how to set up the Architect WebSocket Server plugin with channels, mount a route, and start the application.
Ensure your application uses Architect and the plugin is listed in the config array.
List all required channels in the config object, and check that the channel name matches exactly (case-sensitive).
Consider using the 'ws' library directly with Architect's plugin system, if needed.
Use SockJS API (e.g., conn.write) instead of standard WebSocket methods.
Set prefix if you need a custom path, otherwise ensure client connects to '/sockjs'.
Make sure the 'printer' channel is listed in the channels array in config.js, and access the router only inside the setup callback.
Use the imports parameter in the setup function: module.exports = function(options, imports, register) { var wsserver = imports.wsserver; }Change the port in config or kill the process occupying the port.