SOCKET_OPTIONS
Default WebSocket server options used by BaseSocketServer.
The simple mental model
SOCKET_OPTIONS is the default settings card Redweb starts from before applying the socket choices you provide.
When should I use it?
Read it to understand defaults or build tooling that presents Redweb configuration, but pass explicit options for production decisions.
Follow the example
This pattern explains the named API. Application classes, credentials, and assets may need to be supplied; use a complete recipe for a runnable starting point.
const { SOCKET_OPTIONS } = require('redweb')
// { port: 3000, ssl: null, listen: true, routes: [] }- 1
Redweb begins with immutable documented defaults.
- 2
User configuration overrides only the supplied fields.
- 3
The normalized result is used consistently when the socket server starts.
Methods and members
port
Default WebSocket port (3000).
ssl
Default TLS config (null).
listen
Owned socket servers listen by default. Supplied servers remain caller-owned unless listen is explicitly true.
routes
Routes array default (empty; a DefaultRoute is created when none are provided).