Beignet API reference
    Preparing search index...

    Interface ServerHook<Ctx, Ports>

    Server lifecycle hook collection.

    Hooks run in the order they are registered. onRequest can short-circuit before context creation; beforeHandle can replace context or short-circuit; beforeSend can replace the outgoing response; afterSend observes the final response.

    Type Parameters

    Index

    Properties

    Observes the final response after send preparation.

    Runs after request parsing and context creation.

    Runs before a framework-neutral response is returned.

    Maps unexpected errors to responses.

    name?: string

    Optional name used in diagnostics and devtools.

    Observes framework-caught errors.

    Runs after route matching and before body/query/header parsing.