Class default

Constructors

Properties

Methods

Constructors

Properties

middleware: Handler[]
router: Router
tpl: Tpl

Methods

  • Starts the HTTP server and begins listening for incoming requests.

    Parameters

    • ...args: any[]

      Arguments passed to http.Server.listen.

    Returns this

    • The current instance for chaining.
  • Adds a plugin to the application, which can be a Router instance, Tpl instance, or a middleware handler function. The method determines the type of the plugin and performs the appropriate action.

    • If the plugin is an instance of Router, it is added to the application's router.
    • If the plugin is an instance of Tpl, it sets the application's template engine.
    • If the plugin is a middleware function, it is added to the middleware stack.

    Parameters

    • plugin: Tpl | Router | Handler

      The plugin to add, which can be a Router instance, a Tpl instance, or a middleware handler function.

    Returns this

    The current instance for method chaining.