The base interface for all routes.

Route

Route

import type { FastifyInstance } from "fastify";
import type { ROUTETYPE } from "./utils.js";
interface Route {
    DESCRIPTION?: string;
    ID: string;
    TYPE: ROUTETYPE;
    initialize(
        app: FastifyInstance<
            RawServerDefault,
            IncomingMessage,
            ServerResponse<IncomingMessage>,
            FastifyBaseLogger,
            FastifyTypeProviderDefault,
        >,
    ): Promise<void>;
}

Implemented by

Properties

Methods

Properties

DESCRIPTION?: string

A description of the route.

ID: string

The unique identifier for the route.

TYPE: ROUTETYPE

The type of the route, defined by the ROUTETYPE enum.

Methods

  • Initializes the route.

    Parameters

    • app: FastifyInstance<
          RawServerDefault,
          IncomingMessage,
          ServerResponse<IncomingMessage>,
          FastifyBaseLogger,
          FastifyTypeProviderDefault,
      >

    Returns Promise<void>