OptionalclusterThe ClusterManager for all the spawned server workers. This is populated when the server is
run with a multiple threads (when options.workerCount > 1). It will only be populated for
the primary thread.
The host that the server was attached to. (This is simply passed directly from the user options, merged with the default.)
Kill the service even if it's using multiple workers. Returns a promise that resolves once
Fastify (and its registered plugins) finish their onClose hooks. Including
@fastify/websocket's teardown. So in-flight requests and WebSocket connections drain
cleanly. Always await this in production shutdown paths.
The port that the server actually started on. This depends on the options given to startApiServer.
OptionalserverThe instantiated and running fastify instance.
This is populated when the server is run on only a single thread (when options.workerCount
is 1).
OptionalworkerThe WorkerRunner for the current worker. This is populated when the server is run with a
multiple threads (when options.workerCount > 1). It will only be populated for non-primary
threads.
Output of startApiServer.
Package
@rest-vir/host