ServeStartHook
type ServeStartHook = (kind) => void | Promise<void>;Defined in: src/types.ts:54
Optional lifecycle hook fired once per process before the first dispatched request.
For the stdio server, fires inside VgiRpcServer.run() before the
first read. For HTTP, fires lazily on the first request handled
(fork-safe for pre-fork servers).
If the hook raises, the server logs the exception and propagates it, leaving the bind state unset so the next attempt re-fires the hook rather than silently skipping it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
kind | TransportKind |
Returns
Section titled “Returns”void | Promise<void>