@vsaas/loopback-connector-remote
v11.0.2
Published
Fork of LoopBack 3 remote connector for connecting to REST APIs and other remote services from LoopBack apps
Readme
@vsaas/loopback-connector-remote
@vsaas/loopback-connector-remote is a maintained fork of
loopback-connector-remote for the Xompass LoopBack 3 stack.
The goal of this fork is practical compatibility with existing LoopBack 3
applications while simplifying the package and aligning it with the rest of the
modernized @vsaas/* ecosystem.
What Changed In This Fork
- Runtime migrated to TypeScript-backed sources and built to
dist/ - Tooling aligned with the other forks:
tsdownvitestoxlintoxfmt
- Legacy test/build infrastructure removed:
gruntmocha- old ESLint/JSHint config
- Avoidable development dependencies removed
- Package metadata and exports aligned with the scoped
@vsaas/*packages
This package is intended for the Xompass-maintained LoopBack 3 forks. It is not targeted at LoopBack 4.
Installation
npm install @vsaas/loopback-connector-remoteIn practice this connector is usually installed alongside:
@vsaas/loopback@vsaas/loopback-datasource-juggler@vsaas/remoting
Usage
Configure a datasource with the remote connector:
{
"myRemoteDataSource": {
"name": "myRemoteDataSource",
"connector": "remote",
"url": "http://localhost:3000/api"
}
}Or in code:
const loopback = require('@vsaas/loopback');
const app = loopback();
const ds = app.dataSource('remote', {
connector: require('@vsaas/loopback-connector-remote'),
url: 'http://localhost:3000/api',
});After attaching a compatible remote model, the connector proxies the remote methods through LoopBack models and preserves promise-based usage:
const result = await app.dataSources.remote.models.MyModel.findById(1);Public Exports
@vsaas/loopback-connector-remote@vsaas/loopback-connector-remote/relations
Development
npm run typecheck
npm run lint
npm testNotes
- This fork keeps compatibility with common LoopBack 3 remote-model behavior.
- Error messages and maintenance decisions in the Xompass forks are kept in English only.
- If you are using this package outside the Xompass forked stack, verify the
exact versions of
@vsaas/loopback,@vsaas/loopback-datasource-jugglerand@vsaas/remotingyou want to pair with it.
