You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, @loopback/boot is able to automatically load datasources and model repositories from project files. We should add support for loading services too.
Implement a mixin adding app.service API, this mixin should be provided by @loopback/service-proxy. Proposed implementation (see Add GeoCoder Service to examples/todo #1347):
I am proposing to call the new method serviceProvider in order to avoid possible confusion about the type passed to the sugar API (a Provider vs. a service class), because other sugar-API methods like controller, repository and dataSource are accepting a class constructor.
At the moment,
@loopback/boot
is able to automatically load datasources and model repositories from project files. We should add support for loading services too.See #1347 for an example implementation.
Acceptance criteria
Implement a mixin adding
app.service
API, this mixin should be provided by@loopback/service-proxy
. Proposed implementation (see Add GeoCoder Service to examples/todo #1347):(PR feat(service-proxy): add service mixin #1649, the method name is called
serviceProvider
.)Update the CLI template to apply this new mixin to all newly created applications - PR feat(service-proxy): add service mixin #1649
Add a new booter for loading services from files matching the following naming convention:
services/${name}.service.js
- PR feat(boot): implement Service booter #1652Update/simplify
examples/todo
to use this new functionalityDocument the new booter in Booting an application
Update/simplify the content in the relevant Todo Tutorial section to leverage the new booter
The text was updated successfully, but these errors were encountered: