@sms/host-fastify
Interfaces
FastifyHostOptions
Defined in: packages/drivers/host/fastify/src/index.ts:5
Properties
app?
optional app?: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTypeProviderDefault>;
Defined in: packages/drivers/host/fastify/src/index.ts:7
Mount into an existing app instead of creating one (your routes/auth/plugins keep working beside it).
host?
optional host?: string;
Defined in: packages/drivers/host/fastify/src/index.ts:9
port?
optional port?: number;
Defined in: packages/drivers/host/fastify/src/index.ts:8
prefix?
optional prefix?: string;
Defined in: packages/drivers/host/fastify/src/index.ts:11
URL prefix to mount under, e.g. /sms. Default: everything not matched by your own routes.
Functions
createFastifyHost()
function createFastifyHost(opts?): Host;
Defined in: packages/drivers/host/fastify/src/index.ts:45
Parameters
| Parameter | Type |
|---|---|
opts | FastifyHostOptions |
Returns
registerHandler()
function registerHandler(
app,
handler,
prefix?
): Promise<void>;
Defined in: packages/drivers/host/fastify/src/index.ts:18
Register the handler as a catch-all under prefix, inside an encapsulated plugin scope so that the raw
body handling does not leak into your own routes. The baseline’s content-type handling stays authoritative.
Parameters
| Parameter | Type | Default value |
|---|---|---|
app | FastifyInstance | undefined |
handler | RequestHandler | undefined |
prefix | string | '' |
Returns
Promise<void>