interface WebSocketRouteDefinition
Since 0.3.0

The declarative form of one IWebSocketService.route() call — the entry an application writes instead of calling route() imperatively after start().

Properties

readonly
path: string

The exact URL path to accept upgrades on (e.g. /ws/chat).

The lifecycle callbacks, exactly as the imperative route() accepts.

readonly
optional
options: WebSocketRouteOptions

Per-route configuration, including the route's upgrade guards.

Usage

import { type WebSocketRouteDefinition } from "websocket-plugin/src/index.ts";