Interface IFebby

The main interface representing the Febby application.

Hierarchy

  • IFebby

Implemented by

Methods

  • Initializes and boots up the Febby application.

    Parameters

    • Optional cb: Function

      Callback function to run after booting.

    Returns Promise<void>

  • Closes the application's connection.

    Returns Promise<void>

  • Closes the database connection used by the application.

    Returns Promise<void>

  • Configures CRUD operations for a specific path and model.

    Parameters

    • path: string

      The URL path for CRUD operations.

    • config: ICrudConfig

      Configuration for CRUD operations.

    • model: any

      The Mongoose model for CRUD operations.

    • Optional router: Router

      Optional Express router to use for routes.

    Returns Promise<void>

  • Adds a final request handler middleware to the application.

    Parameters

    • middleware: NextFunction

      The final request handler middleware.

    Returns Promise<void>

  • Loads the default middlewares for the Febby application.

    Returns

    A promise that resolves when the default middlewares are loaded.

    Returns Promise<void>

  • Loads an OpenAPI specification from a YAML file and configures the application.

    Returns

    A promise that resolves when the configuration is loaded.

    Parameters

    • path: string

      The path to the OpenAPI YAML spec file.

    • Optional options: IOpenApiOptions

      Options for controllers, middlewares, and validation.

    Returns Promise<void>

  • Adds a single middleware to an Express router.

    Parameters

    • middleware: NextFunction

      The middleware function.

    • Optional router: Router

      Optional Express router to add the middleware to.

    Returns Promise<void>

  • Adds multiple middlewares to an Express router.

    Parameters

    • middlewares: NextFunction[]

      An array of middleware functions.

    • Optional router: Router

      Optional Express router to add middlewares to.

    Returns Promise<void>

  • Creates a Mongoose model for a specific name and schema.

    Returns

    The created Mongoose model.

    Parameters

    • name: string

      The name of the model.

    • schema: Schema<any, Model<any, any, any, any, any>, {}, {}, {}, {}, DefaultSchemaOptions, {}>

      The schema for the model.

    Returns Promise<Model<Document<any, any, any>, {}, {}, {}, any>>

  • Retrieves all registered Mongoose models.

    Returns

    An object containing all registered Mongoose models.

    Returns Promise<{
        [index: string]: mongoose.Model<mongoose.Document, {}>;
    }>

  • Registers a single route configuration with the application.

    Parameters

    Returns Promise<void>

  • Creates and configures an Express router for a specific URL path.

    Returns

    The created Express router.

    Parameters

    • url: string

      The URL path to create a router for.

    • Optional router: Router

      Optional Express router instance.

    • Optional options: RouterOptions

      Optional router options.

    Returns Promise<Router>

  • Registers multiple route configurations with the application.

    Parameters

    • routesConfig: IRouteConfig[]

      An array of route configurations.

    Returns Promise<void>

  • Shuts down the Febby application.

    Returns Promise<void>

  • Starts the Febby application.

    Returns

    A promise that resolves when the app is started.

    Returns Promise<void>

Generated using TypeDoc