Function routesObject

  • Generates an object containing routes for each model and controller based on provided configuration.

    Parameters

    • models: Record<string, typeof Model>

      The models to generate routes for.

    • controllers: Record<string, typeof Controller> = {}

      The associated controllers for each model.

    • config: IExpressRouterConf = {}

      The configuration for including or excluding routes.

    Returns IRoutesObject

    The constructed routes object.