Back to Loopback Next

Lb4 Only Commands

docs/site/migration/tables/lb4-only-commands.html

4.0.0-alpha.12.4 KB
Original Source

{% include analytics.html %}

CommandsDescriptionReason for difference from LB3
lb4 repositoryCreate a repository for a modelA new concept in LB4. A model's repository> defines the CRUD operations. In LB3, the model defined the CRUD operations.
lb4 controllerCreate a controller for a modelA new concept in LB4. A model's controller defines its REST API endpoints. In LB3, the model's remote methods defined the REST API endpoints.
lb4 import-lb3-modelsImport models from an LB3 project into LB4A new utility command in LB4.
lb4 rest-crudUse this command against a model and datasource, and it creates a rest-crud configuration that allows you to avoid creating a repository and controller for the modelA new utility command in LB4. In LB3, the model defined the CRUD operations and REST API endpoints; there was no need for a command like this. In fact, this LB4 command's purpose allows a user to avoid defining a repository and controller for a given model; similar to the user effort in LB3.
lb4 serviceCreate a serviceA new concept in LB4. See Services for more details.
lb4 discoverCreate models based on table definitions of database backendsA new utility command in LB4. In LB3, discovery was performed programmatically.
lb4 observerCreate a lifecycle observerA new concept in LB4. See Life cycle events and observers for more details.
lb4 interceptorCreate an interceptorA new concept in LB4. See Interceptors for more details.
lb4 extensionCreate a new extensionA new utility command in LB4. LB3 modules are stored in separate github repositories whereas LB4 modules are stored in a single repository (a monorepo). This LB4 command allows a contributor to easily add a new extension subdirectory to the monorepo.
lb4 updateUpdate Loopback 4 project dependenciesA new utility command in LB4.
lb4 copyrightAdd/Update Copyright headers in source code filesA new utility command in LB4.
lb4 exampleDownload LoopBack 4 examplesA new utility command in LB4.