From c6f87538f6789574cf8b27d53b7a79e4fc572aeb Mon Sep 17 00:00:00 2001 From: Flummi Date: Mon, 17 Mar 2025 10:07:09 +0100 Subject: [PATCH] idk xD --- docs/classes/Router.html | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/classes/Router.html b/docs/classes/Router.html index 192d318..a9cfabe 100644 --- a/docs/classes/Router.html +++ b/docs/classes/Router.html @@ -10,47 +10,47 @@ put static use -

Constructors

Methods

  • Registers a route for HTTP DELETE requests.

    +

Constructors

Methods

  • Registers a route for HTTP DELETE requests.

    Parameters

    • path: string | RegExp

      The URL path or pattern for the route.

      -
    • cb: Handler[]

      An array of middleware or handler functions to execute for this route.

      +
    • ...callback: Handler[]

      An array of middleware or handler functions to execute for this route.

    Returns this

    The current instance for method chaining.

    -
  • Registers a route for HTTP GET requests.

    +
  • Registers a route for HTTP GET requests.

    Parameters

    • path: string | RegExp

      The URL path or pattern for the route.

      -
    • cb: Handler[]

      An array of middleware or handler functions to execute for this route.

      +
    • ...callback: Handler[]

      An array of middleware or handler functions to execute for this route.

    Returns this

    The current instance for method chaining.

    -
  • Finds and returns the route matching the given path and method.

    +
  • Finds and returns the route matching the given path and method.

    Parameters

    • path: string

      The requested path.

    • method: string

      The HTTP method (e.g., "GET").

    Returns any

    The matching route or undefined.

    -
  • Registers a new route group with common base path and middleware.

    +
  • Registers a new route group with common base path and middleware.

    Parameters

    • basePath: string | RegExp

      The base path or RegExp.

    • callback: (methods: any) => void

      Callback to define routes within the group.

    Returns this

    The Router instance for chaining.

    -
  • Registers a route for HTTP HEAD requests.

    +
  • Registers a route for HTTP HEAD requests.

    Parameters

    • path: string | RegExp

      The URL path or pattern for the route.

      -
    • cb: Handler[]

      An array of middleware or handler functions to execute for this route.

      +
    • ...callback: Handler[]

      An array of middleware or handler functions to execute for this route.

    Returns this

    The current instance for method chaining.

    -
  • Dynamically imports routes from a directory and registers them.

    +
  • Dynamically imports routes from a directory and registers them.

    Parameters

    • p: string

      Path to the directory containing route files.

    • tpl: false | Tpl = false

      Optional template instance to use with the routes.

    Returns Promise<Router>

    The Router instance for chaining.

    -
  • Registers a route for HTTP PATCH requests.

    +
  • Registers a route for HTTP PATCH requests.

    Parameters

    • path: string | RegExp

      The URL path or pattern for the route.

      -
    • cb: Handler[]

      An array of middleware or handler functions to execute for this route.

      +
    • ...callback: Handler[]

      An array of middleware or handler functions to execute for this route.

    Returns this

    The current instance for method chaining.

    -
  • Registers a route for HTTP POST requests.

    +
  • Registers a route for HTTP POST requests.

    Parameters

    • path: string | RegExp

      The URL path or pattern for the route.

      -
    • cb: Handler[]

      An array of middleware or handler functions to execute for this route.

      +
    • ...callback: Handler[]

      An array of middleware or handler functions to execute for this route.

    Returns this

    The current instance for method chaining.

    -
  • Registers a route for HTTP PUT requests.

    +
  • Registers a route for HTTP PUT requests.

    Parameters

    • path: string | RegExp

      The URL path or pattern for the route.

      -
    • cb: Handler[]

      An array of middleware or handler functions to execute for this route.

      +
    • ...callback: Handler[]

      An array of middleware or handler functions to execute for this route.

    Returns this

    The current instance for method chaining.

    -
  • Serves static files from a specified directory.

    +
  • Serves static files from a specified directory.

    Parameters

    • options: { dir?: string; route?: RegExp }

      Options for serving static files.

      • Optionaldir?: string

        Directory containing the static files.

      • Optionalroute?: RegExp

        Regular expression to match the route for static files.

    Returns this

    The Router instance for chaining.

    -
  • Merges routes or assigns a template instance to the Router.

    +
  • Merges routes or assigns a template instance to the Router.

    Parameters

    • obj: Tpl | Router

      An instance of Router or Tpl.

      -

    Returns void

+

Returns void