LoopBack Documentation
website·Indexed 38 days ago
https://loopback.io/doc/Documentation for the LoopBack framework, including API references for @loopback/rest, guides for lb3 and lb4, and connector tutorials for MongoDB, Oracle, and Microsoft SQL Server. Includes security advisories, troubleshooting guides, and getting started instructions for building APIs with Node.js.
What's inside LoopBack
- Mixins allow developers to apply common logic to a set of models. They can be used to inject properties into model definitions or observe changes using operation hooks. Mixins can be applied to any model, including built-in models.
Overview of @loopback/repository-tests
The@loopback/repository-testspackage provides a standardized test suite to verify the functionality of@loopback/repositoryin a connector-independent manner. It allows developers to test any combination of a Repository class (such asDefaultCrudRepository) and a corresponding connector (such as memory, MySQL, or MongoDB) to ensure consistent behavior across different data sources.Overview of OpenAPI-to-GraphQL functionality
OpenAPI-to-GraphQL allows developers to take any OpenAPI Specification (OAS) and automatically create a GraphQL interface. It provides several key capabilities:
- Nested Data Support: It uses OAS schemas to create GraphQL data definitions and utilizes links defined in the OAS to enable deeply nested queries.
- API Sanitation: The tool automatically sanitizes identifiers that are incompatible with GraphQL. Parameters or data definitions containing unsupported characters (such as
-,.,,,:,;) are removed to ensure GraphQL compatibility. - Authentication: It provides viewers to support passing basic authentication credentials or API keys. For OAuth 2.0 integration, the hosting application must handle the implementation.
Overview of LoopBack 3 Model Mixins
Mixins in LoopBack 3 allow developers to apply common logic to a set of models. They can be used to inject properties (like timestamps) or observe model changes using operation hooks. Mixins can be applied to any model, including built-in models.Overview of LoopBack 4 Framework
LoopBack 4 is a highly extensible Node.js and TypeScript framework designed for building APIs and microservices. It features a core written in TypeScript/ES2017 and utilizes an OpenAPI specification-driven approach for creating REST APIs. The framework implements a modern programming model that includes Dependency Injection, Components, Mixins, and Repositories to maximize extensibility.Overview of the @loopback/metrics package
The@loopback/metricspackage provides a component designed to report metrics from Node.js, the LoopBack framework, and your specific application to Prometheus.Overview of LoopBack Connectors
LoopBack connectors implement the data exchange logic required to communicate with backend systems. They allow LoopBack to interact with relational databases, NoSQL databases, REST APIs, and SOAP APIs. Connectors are categorized into built-in (such as the memory connector for local development), database connectors, other API-based connectors, and community-maintained connectors.Overview of @loopback/metadata
The
@loopback/metadatamodule provides utilities for implementing TypeScript decorators, defining and merging metadata, and inspecting that metadata. It consists of three primary components:- Reflector: A wrapper around
reflect-metadata. - Decorator factories: Tools to create class, method, property, and parameter decorators.
- MetadataInspector: High-level APIs to retrieve metadata applied to classes and their members.
- Reflector: A wrapper around
Overview of the LoopBack Framework
LoopBack is an open-source Node.js framework designed for creating dynamic end-to-end REST APIs with minimal coding. It provides capabilities to access data from relational databases, MongoDB, SOAP, and REST APIs, and supports model relationships, access controls, file storage components, third-party login, and OAuth 2.0.Overview of StrongLoop strong-pubsub messaging
strong-pubsub is a library of modules implementing the publish-subscribe programming model. It is designed to be transport-agnostic and protocol-agnostic, allowing developers to swap out underlying adapters (e.g., MQTT, Redis) and transports (e.g., TCP, TLS, WebSockets, Primus) without changing the core application logic. Note: As of the current documentation, these modules are pre-version 1.0 and the API may change.Overview of Dependency Injection in LoopBack 4
Dependency Injection (DI) in LoopBack 4 separates the construction of a class or function's dependencies from its behavior to ensure loose coupling. This allows developers to easily rewire dependencies for customization or inject mocks and stubs for unit testing, especially when dealing with external services like databases or OAuth2 providers. The@loopback/corepackage re-exports all public APIs of@loopback/context; using@loopback/corefor imports is recommended for consistency.Overview of the LoopBack Framework
LoopBack is a highly extensible open-source Node.js framework designed to create dynamic end-to-end REST APIs with minimal or no coding. It allows developers to:
- Access data from relational databases, MongoDB, SOAP, and REST APIs.
- Implement relationship models and access control for complex APIs.
- Utilize built-in push, geolocation, and file services for mobile applications.
- Build client applications for Android, iOS, and JavaScript SDKs.
- Deploy applications locally or in cloud services.