Skip to content

Ideas for v3.0 #2

Description

@bajtos

Copy of comment by @raymondfeng:

  1. I think we need to organize the boot into multiple phases, such as:
    • discover/load: Find and load configurations
    • resolve/wire: Resolve the references (such as model.dataSource) and wire them together
    • startup: Initialize the datasources/models (model class can potentially have lifecycle event listeners)
    • shutdown: Emit events to notify model classes of system shutdown
    • refresh/update: React to config changes, especially additions
  2. How do we load plugin modules, for example, loopback-passport, loopback-push-notification which typically has dependencies to app and also contributes middlewares/models/datasources? See https://github.com/strongloop/loopback-example-component/issues/4
  3. Do we want to support both sync and async booting? Or eager/lazy booting? See Add support async scripts #50 for implementation of async boot scripts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions