Skip to content

Server & client options

The common options for createSuperLineServer(contract, options) and createSuperLineClient(contract, options). The authoritative, exhaustive set is generated from source — see @super-line/server and @super-line/client.

Server — createSuperLineServer

OptionRequiredWhat it does
transportsthe client↔server wire(s) the server accepts
authenticateruns once per connection; returns { role, ctx } (throw to reject at handshake) — see Roles & auth
identifymap a connection to a stable user id (for presence + toUser)
serializercustom wire codec — see Serialization
adapterserver↔server fan-out for multi-node (in-memory by default)
nodeNamea friendly node label surfaced in Control Center
collectionsthe row-collection backend (one per server)
crdtCollectionsthe CRDT document backend
policiesper-collection read/write policies (deny-by-default)
checkReferencesopt into advisory FK existence checks
onConnectiona per-connection hook ((conn, ctx) => void)

The inspector is now a plugin (@super-line/plugin-inspector), not a server option — add it via plugins: [...].

Client — createSuperLineClient

OptionRequiredWhat it does
transportthe client wire (the only line that changes between wires)
rolenarrows the surface to shared ∪ role; verified by the server's authenticate
paramshandshake params, readable server-side as h.query.*
crdtCollectionsthe universal CRDT client engine (crdtCollectionsClient())
serializera codec matching the server's — see Serialization

See the API reference for every option and its exact type.

Released under the MIT License.