File: README.md
LoopBack makes it easy to build modern applications that require complex
integrations.
- Fast, small, powerful, extensible core
- Generate real APIs with a single command
- Define your data and endpoints with OpenAPI
- No maintenance of generated code
Status: General Availability
LoopBack 4 GA (General Availability) has been released in October 2018, read
more in the announcement post.
The documentation website is https://loopback.io/doc/en/lb4/.
Learn about the latest and greatest
features and technologies in LoopBack 4
by using it for your next project. Start by having a look at
Getting Started.
Check the API documentation
for all the API usages in each package.
Long Term Support
We don't provide any LTS version for LoopBack 4 yet. Please join the discussion
in loopback-next#4398
if you are interested in a version that's less frequently changed.
| Version | Status | Published | EOL |
|---|---|---|---|
| LoopBack 4 | Current | Oct 2018 | Apr 2028 (minimum) |
| LoopBack 3 | End-of-Life | Dec 2016 | Dec 2020 |
| LoopBack 2 | End-of-Life | Jul 2014 | Apr 2019 |
Please refer to our
Long Term Support Policy
for more details.
Installation
Make sure you have the following installed:
| Package | Version/-s | Link | Note |
|---|---|---|---|
| Node.js | Maintenance LTS (v22) Active LTS (v24) Current (v26) | https://nodejs.org/en/about/releases/ | The use of the current version for production is not recommended. |
You can generate a project with our generator or with the CLI as follows:
npm create loopback
npx -p @loopback/cli lb appTo create your first LoopBack 4 application, see
Getting Started.
Documentation
Contributing
See the following resources to get you started:
You can join the team by posting a comment to
issue #110.
Security
If you think you have discovered a new security issue with any LoopBack package,
please do not report it on GitHub. Instead, send an email to
[email protected] with a full description and
steps to reproduce.
See SECURITY.md for more details.
Team
Project Architect
| Raymond Feng |
|---|
| [ |
Technical Steering Committee
| Raymond Feng | Diana Lau | Mario Estrada | Rifa Achrinza | Francisco Buceta | Samarpan Bhattacharya |
|---|---|---|---|---|---|
| [ | [ | [ | [ | [ | [ |
Other Project Maintainers
| Nora Abdelgadir | Matthew Schnee | Hage Yaapa |
|---|---|---|
| [ | [ | [ |
| Agnes Lin | Madaky | Hugo Da Roit |
| [ | [ | [ |
| Nico Flaig | Denny Bartelt | Douglas McConnachie |
| [ | [ | [ |
| Samarpan Bhattacharya | Muhammad Aaqil | |
| [ | [ |
See
all contributors.
Alumni
- @ritch
- @superkhau
- @rashmihunt
- @kjdelisle
- @virkt25
- @shimks
- @b-admike
- @deepakrkris
- @bajtos
- @jannyhou
- @emonddr
License
File: acceptance/extension-logging-fluentd/README.md
@loopback/test-extension-logging-fluentd
Acceptance tests for @loopback/logging against a fluentd server.
Running the test suite
Prerequisite
- Docker is installed.
Run the test:
For mocha tests, we use
testcontainers to
start/stop the fluentd docker container automatically.
The fluentd configuration is read from fixtures/etc/fluentd.conf.
npm testContributors
See
all contributors.
License
MIT
File: acceptance/repository-cloudant/README.md
@loopback/test-repository-cloudant
Acceptance tests for @loopback/repository + loopback-connector-cloudant.
Running the test suite
Using own Cloudant instance
If you have a local or remote Cloudant instance and would like to use that to
run the test suite, use the following command:
Linux & MacOS
CLOUDANT_URL= CLOUDANT_HOST=<HOST> CLOUDANT_PORT= CLOUDANT_USERNAME= CLOUDANT_PASSWORD= CLOUDANT_DATABASE=<DATABASE> npm testWindows
SET CLOUDANT_URL=
SET CLOUDANT_HOST=<HOST>
SET CLOUDANT_PORT=
SET CLOUDANT_USERNAME=
SET CLOUDANT_PASSWORD=
SET CLOUDANT_DATABASE=<DATABASE>
npm testUsing Docker (Linux, MacOS, WSL)
If you do not have a local Cloudant instance, you can also run the test suite
with very minimal requirements. We use couchDB docker image to run the test
locally.
NOTICE: we use couchDB3 docker image for testing Cloudant because Cloudant
doesn't have a maintained image, and most of the their functionalities are the
same (except couchDB doesn't support geosearch).
Install Docker.
Run the following script
bash. setup.sh <HOST> <DATABASE>Where
<HOST>,,, `` and<DATABASE>are optional
parameters. The default values arelocalhost,5984,admin,passandtestdbrespectively.The
andyou set above will be the admin/password of this
couchDB3 container.Run the test:
bashnpm test
Contributors
See
all contributors.
License
MIT
File: acceptance/repository-mongodb/README.md
@loopback/test-repository-mongodb
Acceptance tests for @loopback/repository + loopback-connector-mongodb.
Running the test suite
Using own MongoDB instance
If you have a local MongoDB instance listening on localhost and the default
port, use the following command:
npm testIf you have a local or remote MongoDB instance and would like to use that to run
the test suite, use the following command:
Linux & MacOS
MONGODB_HOST=<HOST> MONGODB_PORT= MONGODB_DATABASE=<DATABASE> npm testWindows
SET MONGODB_HOST=<HOST>
SET MONGODB_PORT=
SET MONGODB_DATABASE=<DATABASE>
npm testUsing Docker (Linux, MacOS, WSL)
If you do not have a local MongoDB instance, you can also run the test suite
with very minimal requirements.
Assuming you have Docker
installed, run the following script which would spawn a MongoDB instance on
your local:bashsource setup.sh <HOST> <DATABASE>Where
<HOST>, `` and<DATABASE>are optional parameters. The default
values arelocalhost,27017andtestdbrespectively.Run the test:
bashnpm test
Contributors
See
all contributors.
License
MIT
File: acceptance/repository-mysql/README.md
@loopback/test-repository-mysql
Acceptance tests for @loopback/repository + loopback-connector-mysql.
Running the test suite
Using own MySQL instance
If you have a local MySQL instance listening on localhost and the default
port, with a root user and an empty password, use the following command:
npm testIf you have a local or remote MySQL instance and would like to use that to run
the test suite, use the following command:
Linux & MacOS
MYSQL_HOST=<HOST> MYSQL_PORT= MYSQL_USER= MYSQL_PASSWORD= MYSQL_DATABASE=<DATABASE> npm testWindows
SET MYSQL_HOST=<HOST>
SET MYSQL_PORT=
SET MYSQL_USER=
SET MYSQL_PASSWORD=
SET MYSQL_DATABASE=<DATABASE>
npm testUsing Docker (Linux, MacOS, WSL)
If you do not have a local MySQL instance, you can also run the test suite with
very minimal requirements.
Assuming you have Docker
installed, run the following script which would spawn a MySQL instance on your
local:bashsource setup.sh <HOST> <DATABASE>Where
<HOST>,,, `` and<DATABASE>are optional
parameters. The default values arelocalhost,3306,root,passandtestdbrespectively.Run the test:
bashnpm test
Contributors
See
all contributors.
License
MIT
File: acceptance/repository-postgresql/README.md
@loopback/test-repository-postgresql
Acceptance tests for @loopback/repository + loopback-connector-postgresql.
Running the test suite
Using own PostgreSQL instance
If you have a local PostgreSQL instance listening on localhost and the default
port, with a root user and an empty password, use the following command:
npm testIf you have a local or remote PostgreSQL instance and would like to use that to
run the test suite, use the following command:
Linux & MacOS
POSTGRESQL_HOST=<HOST> POSTGRESQL_PORT= POSTGRESQL_USER= POSTGRESQL_PASSWORD= POSTGRESQL_DATABASE=<DATABASE> npm testWindows
SET POSTGRESQL_HOST=<HOST>
SET POSTGRESQL_PORT=
SET POSTGRESQL_USER=
SET POSTGRESQL_PASSWORD=
SET POSTGRESQL_DATABASE=<DATABASE>
npm testUsing Docker (Linux, MacOS, WSL)
If you do not have a local PostgreSQL instance, you can also run the test suite
with very minimal requirements.
Assuming you have Docker
installed, run the following script which would spawn a PostgreSQL instance on
your local:bashsource setup.sh <HOST> <DATABASE>Where
<HOST>,,, `` and<DATABASE>are optional
parameters. The default values arelocalhost,5432,root,passand
bothrepository_testsandrepository_tests_newrespectively.Run the test:
bashnpm test
Contributors
See
all contributors.
License
MIT
File: acceptance/README.md
Acceptance tests
This directory contains packages with acceptance-level tests. These tests are
not invoked as part of root npm test, you have to run them manually. Consult
README files of individual packages for instructions on how to run the tests.
File: benchmark/src/context-binding/README.md
Context binding benchmark
This directory contains a simple benchmarking to measure the performance of
different styles of context bindings.
Basic use
npm run -s benchmark:contextFor example:
npm run -s benchmark:contextBase lines
| Test | Ops/sec | Relative margin of error | Runs sampled | Count |
|---|---|---|---|---|
| factory - getSync | 1,282,238 | ยฑ1.11% | 93 | 68537 |
| factory - get | 1,222,587 | ยฑ1.19% | 87 | 66558 |
| asyncFactory - get | 362,457 | ยฑ1.78% | 78 | 23284 |
| staticProvider - getSync | 484,494 | ยฑ1.04% | 92 | 26260 |
| staticProvider - get | 475,130 | ยฑ1.13% | 86 | 27435 |
| asyncStaticProvider - get | 339,359 | ยฑ1.43% | 86 | 19046 |
| provider - getSync | 368,127 | ยฑ1.14% | 87 | 21162 |
| provider - get | 366,649 | ยฑ0.86% | 86 | 21358 |
| asyncProvider - get | 291,054 | ยฑ1.94% | 82 | 16557 |
File: benchmark/src/rest-routing/README.md
REST routing benchmark
This directory contains a simple benchmarking to measure the performance of two
router implementations for REST APIs. See
https://loopback.io/doc/en/lb4/Routing-requests.html for more information.
Basic use
npm run -s benchmark:routing // default to 1000 routes
npm run -s benchmark:routing -- <number-of-routes> <number-of-routes>For example:
npm run -s benchmark:routing -- 10 40 160 640 2560Base lines
name duration count found missed
TrieRouter 0,1038244 10 8 2
RegExpRouter 0,1002559 10 8 2
name duration count found missed
TrieRouter 0,661415 40 35 5
RegExpRouter 0,5797990 40 35 5
name duration count found missed
TrieRouter 0,2851976 160 140 20
RegExpRouter 0,27040556 160 140 20
name duration count found missed
TrieRouter 0,8914005 640 560 80
RegExpRouter 0,330599418 640 560 80
name duration count found missed
TrieRouter 0,45302321 2560 2240 320
RegExpRouter 5,471787942 2560 2240 320File: benchmark/README.md
benchmark
Benchmarks for LoopBack framework.
Results
MacBookPro Early 2015 Processor: 2.5 GHz Intel Core i5 Memory: 8 GB 1867 MHz
DDR3
Requests per seconds
Average number of requests handled every second.
| scenario | rps |
|---|---|
| find all todos | 2620 |
| create a new todo | 2603 |
Latency
Average time to handle a request in milliseconds.
| scenario | latency |
|---|---|
| find all todos | 3.31 |
| create a new todo | 3.35 |
Basic use
Install all dependencies.
$ npm installRun the tests to verify the benchmarked scenarios are working correctly.
$ npm testRun the benchmark.
$ npm startContributions
Contributors
See
all contributors.
License
MIT