LoopBack 3.x is an open-source Node.js framework designed for rapidly creating dynamic end-to-end REST APIs with minimal coding. It facilitates data access from a wide array of databases, including Oracle, MySQL, PostgreSQL, MS SQL Server, and MongoDB, and supports incorporating complex model relationships and robust access controls. The framework also offers built-in services for mobile application development, such as push notifications, geolocation, and file storage. The current stable version for LoopBack 3 is 3.28.0, but it is in Maintenance LTS (Long Term Support) mode, having passed its official End-Of-Life (EOL) in December 2020. Consequently, only critical bugs and security fixes are provided for this version, and users are strongly encouraged to migrate to LoopBack 4, which represents the actively developed and supported iteration of the framework. LoopBack 3 applications are typically built using its collection of Node.js modules, Yeoman generators for scaffolding, and client SDKs.
npm install loopbackVerified import paths — ran on the pinned version, not inferred.
This quickstart initializes a basic LoopBack 3.x application, sets up the server to listen on a port, and defines a simple root endpoint. It demonstrates the fundamental structure of a LoopBack 3 `server.js` file, using `loopback` and `loopback-boot` to start the application.
Plan and execute migration of applications to LoopBack 4, which is the current and actively developed version of the framework. Refer to the official migration guide at `loopback.io/doc/en/lb4/migration-overview.html`.
Ensure `loopback-datasource-juggler` is correctly listed as a direct dependency in your `package.json` and installed via `npm install` or `yarn add`.
Thoroughly review the LoopBack 3.0 Release Notes and Migration Guide at `loopback.io/doc/en/lb3/3.0-Release-Notes.html` and `loopback.io/doc/en/lb3/Migrating-to-3.0.html` before upgrading.
Upgrade to the latest available patch version of LoopBack 3.x (e.g., 3.28.1 or higher) to ensure `querystring.stringify` is correctly used for link generation.
Install it explicitly: `npm install loopback-datasource-juggler` or ensure it's in your `package.json` dependencies and run `npm install`.
Ensure `loopback-boot` is installed (`npm install loopback-boot`) and then require and use it: `const boot = require('loopback-boot'); boot(app, __dirname, callback);`Enable CORS middleware in your `server.js` or `middleware.json` by adding `app.use(loopback.cors());` or configuring it in `middleware.json`.