@darthcav/ts-http-server
    Preparing search index...

    Function defaultRoutes

    • Returns the default route map used in launcher.

      Registers:

      • GET / — renders index.ejs for text/html, throws 406 otherwise.
      • DELETE|PATCH|POST|PUT|OPTIONS / — responds with 405 Method Not Allowed.
      • GET /api/ — returns a JSON welcome message.
      • DELETE|PATCH|POST|PUT /api/ — responds with 405 Method Not Allowed.
      • GET /health — returns a JSON health/status report (application/health+json, per the IETF "Health Check Response Format for HTTP APIs" draft). Evaluates any opts.healthChecks and responds 200 when the overall status is pass/warn, or 503 when it is fail.
      • DELETE|PATCH|POST|PUT /health — responds with 405 Method Not Allowed.

      Authentication is handled globally by the preHandler hook registered in launcher when locals.authPaths is set.

      Parameters

      Returns Map<
          string,
          RouteOptions<
              RawServerDefault,
              IncomingMessage,
              ServerResponse<IncomingMessage>,
              RouteGenericInterface,
              unknown,
              FastifySchema,
              FastifyTypeProviderDefault,
              FastifyBaseLogger,
          >,
      >

      A Map of route names to RouteOptions, suitable for passing as the routes field of LauncherOptions.