Constructors
Methods
Static
registerRoute
- registerRoute(
app: FastifyInstance<
RawServerDefault,
IncomingMessage,
ServerResponse<IncomingMessage>,
FastifyBaseLogger,
FastifyTypeProviderDefault,
>,
method: HttpMethod,
path: string,
handler: (
request: FastifyRequest<
RouteGenericInterface,
RawServerDefault,
IncomingMessage,
FastifySchema,
FastifyTypeProviderDefault,
unknown,
FastifyBaseLogger,
ResolveFastifyRequestType<
FastifyTypeProviderDefault,
FastifySchema,
RouteGenericInterface,
>,
>,
reply: FastifyReply<
RouteGenericInterface,
RawServerDefault,
IncomingMessage,
ServerResponse<IncomingMessage>,
unknown,
FastifySchema,
FastifyTypeProviderDefault,
unknown,
>,
) => Promise<void>,
): void Parameters
- app: FastifyInstance<
RawServerDefault,
IncomingMessage,
ServerResponse<IncomingMessage>,
FastifyBaseLogger,
FastifyTypeProviderDefault,
> - method: HttpMethod
- path: string
- handler: (
request: FastifyRequest<
RouteGenericInterface,
RawServerDefault,
IncomingMessage,
FastifySchema,
FastifyTypeProviderDefault,
unknown,
FastifyBaseLogger,
ResolveFastifyRequestType<
FastifyTypeProviderDefault,
FastifySchema,
RouteGenericInterface,
>,
>,
reply: FastifyReply<
RouteGenericInterface,
RawServerDefault,
IncomingMessage,
ServerResponse<IncomingMessage>,
unknown,
FastifySchema,
FastifyTypeProviderDefault,
unknown,
>,
) => Promise<void>
Returns void
Utility class for registering routes in the Fastify application.