Skip to content

Missing one step for adding ServiceMixin in documentation #1701

@shazha

Description

@shazha

Description / Steps to reproduce / Feature proposal

Create a new LB4 app and try to add a rest service as datasource by following the doc Integrate with a geo-coding service.

Current Behavior

When trying to access the injected rest service, the following exception occurred:
The key services.GeocoderService was not bound to any value.

Expected Behavior

The rest service can be injected properly.

Fix

After applying the following changes to application.ts file, the error is gone. And this should be documented:

From

export class StorageApplication extends BootMixin(
  RepositoryMixin(RestApplication),

to

import {ServiceMixin} from '@loopback/service-proxy';

export class StorageApplication extends BootMixin(
  ServiceMixin(RepositoryMixin(RestApplication)),

See Reporting Issues for more tips on writing good issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions