The remote connector enables using a LoopBack application as a data source via REST, allowing seamless integration of remote APIs into LoopBack models. Current stable version is 3.4.1, supporting Node >=6. It is part of the LoopBack ecosystem and is maintained with irregular releases. Differentiators: automatic generation of client-side models from remote service endpoints, supports both server and browser environments, and abstracts REST calls via StrongRemoting. Alternative to manual HTTP requests.
npm install loopback-connector-remoteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a remote data source and call a remote method using the LoopBack remote connector.
Add code to set credentials: app.dataSources.remote.connector.remotes.auth = { bearer: Buffer.from(token).toString('base64'), sendImmediately: true };Upgrade to loopback-connector-remote@3 and use LoopBack v3+.
Explicitly define client-side model stubs using the `use` pattern: app.model(MyModel, { dataSource: 'remote' });Ensure the remote server is started and that the `url` property in datasources.json points to the correct endpoint.
Check that the remote API exposes models and that the datasource is properly connected. Use ds.on('connected', callback) to wait for initialization.Set authentication token programmatically: app.dataSources.remote.connector.remotes.auth = { bearer: Buffer.from(token).toString('base64'), sendImmediately: true };