@bearnjs/rest
    Preparing search index...

    Class Bearn

    BearnApp

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    basePrefix: undefined | string

    An optional prefix used when the router is mounted without a specific path.

    description: undefined | string

    An optional description for the router, useful for documentation or logging.

    name: undefined | string

    An optional name for the router, useful for identification.

    Methods

    • Function

      Stops the server if running.

      Parameters

      • Optionalcallback: (err?: Error) => void

        The callback function to call when the server stops.

      Returns void

    • Function

      Registers a global error handler invoked on uncaught route/middleware errors.

      Parameters

      • handler: ErrorHandler

        The error handler function to register.

      Returns void

    post

    • Function

      Registers any controllers discovered via decorators. Typically invoked automatically on first request.

      Returns void

    • Function

      Starts the HTTP server and begins handling requests.

      Parameters

      • Optionalcallback: (info: ListenInfo) => void

        The callback function to call when the server starts.

      Returns Server

      The underlying Node Server instance.