@mekik/ws
v0.7.0
Published
WebSocket transport for mekik — serve a MekikApp over the mekik/1 wire protocol.
Maintainers
Readme
@mekik/ws
WebSocket transport for mekik — serves a
MekikApp over the mekik/1 wire protocol. A thin adapter over ws: every
protocol rule lives in the engine, this package only speaks sockets.
import { mekik } from "@mekik/core";
import { serveWs } from "@mekik/ws";
const app = mekik({ graph });
serveWs(app, { port: 8800, path: "/ws" }); // omit `path` to accept any pathIdentity may arrive in the URL query string or the first hello frame; both are
merged at connect. Returns a handle so a test or process can shut the server down.
MIT
