Skip to content

Example of using remote connector with LB4 #1696

@nikivanov

Description

@nikivanov

Hi!

I'm trying to talk to an LB2 application from my LB4 application via the remote connector. I have no problem using the REST connector, but it doesn't do method translation properly when using DefaultCrudRepository. If I create the REST datasource like this:

const dataSource = new juggler.DataSource({
	"name": "remoteDS",
	"connector": "rest",
	"baseURL": "http://localhost:3020/v1/",
});

and then await dataSource.connect(), it connects with no problems.

However, if I set it up like this:

const dataSource = new juggler.DataSource({
	"name": "remoteDS",
	"connector": "remote",
	"url": "http://localhost:3020/v1/",
});

and then await dataSource.connect(), the connect promise never gets resolved.

In general, I have trouble finding anything about Loopback 4 and the remote connector. Are there any tutorials or documentation that would be valid for LB4? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions