HTTP server assembly. Wires the Express backend, request adapter, OpenAPI description and mDNS advertisement together into the closedcode server that the SDK and TUI connect to.
Methods
(static) Legacy(opts) → {Object}
Build an Express server, forcing the explicit "express" backend selection.
| Name | Type | Description |
|---|---|---|
opts | Object | Server construction options forwarded to createExpress. |
The constructed server instance.
- Type:
- Object
(static) listen(opts) → {Promise.<Object>}
Build and start the server, listening on the configured hostname/port, and optionally publishing an mDNS advertisement (skipped for loopback hosts). Sets the module-level url to the resolved listen address.
| Name | Type | Description |
|---|---|---|
opts | Object | Listen options including hostname, port, mdns, and mdnsDomain. |
A handle { hostname, port, url, stop } where stop(close) shuts the server down (idempotent) and unpublishes mDNS.
- Type:
- Promise.<Object>
(static) openapi() → {Object}
Return the OpenAPI description document for the Express backend.
The OpenAPI specification object.
- Type:
- Object
(inner) create(opts) → {Object}
Build a fresh Express server with the auto-selected backend and given options.
| Name | Type | Description |
|---|---|---|
opts | Object | Server construction options forwarded to createExpress. |
The constructed server instance.
- Type:
- Object
(inner) select() → {Object}
Determine which server backend to use.
The backend selection descriptor.
- Type:
- Object
(inner) withBackend(selection, built) → {*}
Log the chosen server backend selection and pass the built server through.
| Name | Type | Description |
|---|---|---|
selection | Object | Backend selection descriptor from ServerBackend.select. |
built | * | The constructed server instance to return unchanged. |
The same built value that was passed in.
- Type:
- *