LoopBack 4 comes with the following example projects.
Shopping example application showcasing LoopBack features
- loopback4-example-shopping: An online e-commerce demo to validate/test the LoopBack 4 framework readiness.
Examples for beginners
hello-world: An example showing how to set up a simple application using LoopBack 4.
Examples implementing/using extensions
greeter-extension: An example showing how to implement the extension point/extension pattern.
log-extension: An example showing how to write a complex log extension for LoopBack 4.
Examples with migration
lb3-application: An example demonstrating how to mount your existing LoopBack 3 application on a new LoopBack 4 project.
access-control-migration: An example demonstrating how to implement a Role Based Access Control (RBAC) system.
Authentication and authorization related examples
file-transfer: An example showing how to expose APIs to upload and download files.
greeting-app: An example showing how to compose an application from component and controllers, interceptors, and observers.
multi-tenancy: An example application to demonstrate how to implement multi-tenancy with LoopBack 4.
rpc-server: An example showing how to implement a made-up RPC protocol.
rest-crud: An example showing how to use
CrudRestComponentto define default repository and controller classes for a model without creating those classes.
validation-app: An example demonstrating how to add validations in a LoopBack application.
webpack: An example to bundle @loopback/core using webpack
How to download examples
You can download the example projects using our CLI tool
lb4 example <example-name>
For example, the following command downloads the
hello-world example into
lb4 example hello-world
Please follow the instructions in
Install LoopBack4 CLI if you don’t
lb4 installed yet.
The official examples are hosted at the following urls:
For examples created by the community, see the community examples page.