## File: README.md

[](https://github.com/loopbackio/loopback-next/actions/workflows/continuous-integration.yml)
[](https://coveralls.io/github/loopbackio/loopback-next?branch=master)
[](https://github.com/loopbackio/loopback-next/actions?query=workflow%3ACodeQL)

[](https://twitter.com/strongloop)
[](https://www.linkedin.com/groups/5046525/)
[](https://join.slack.com/t/loopbackio/shared_invite/zt-8lbow73r-SKAKz61Vdao~_rGf91pcsw)

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](http://strongloop.com/strongblog/loopback-4-ga).

The documentation website is https://loopback.io/doc/en/lb4/.

Learn about the latest and greatest
[features and technologies in LoopBack 4](https://loopback.io/doc/en/lb4/Crafting-LoopBack-4.html)
by using it for your next project. Start by having a look at
[Getting Started](https://loopback.io/doc/en/lb4/Getting-started.html).

Check the [API documentation](https://loopback.io/doc/en/lb4/apidocs.index.html)
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](https://github.com/loopbackio/loopback-next/issues/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](https://loopback.io/doc/en/contrib/Long-term-support.html)
for more details.

## Installation

Make sure you have the following installed:

| Package                                    | Version/-s                                                             | Link                                  | Note                                                                                                  |
| ------------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [Node.js](https://nodejs.org/en/download/) | 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:

```shell
npm create loopback
npx -p @loopback/cli lb app
```

To create your first LoopBack 4 application, see
[Getting Started](http://loopback.io/doc/en/lb4/Getting-started.html).

## Documentation

- [Official documentation](http://loopback.io/doc/en/lb4/)
- [API documentation](https://loopback.io/doc/en/lb4/apidocs.index.html)
- [FAQ](http://loopback.io/doc/en/lb4/FAQ.html)
- [LoopBack 3 vs LoopBack 4](http://loopback.io/doc/en/lb4/migration-overview.html)
- [Tutorials](http://loopback.io/doc/en/lb4/Tutorials.html)
- [Examples](http://loopback.io/doc/en/lb4/Examples.html)

## Contributing

See the following resources to get you started:

- [Contributing Guidelines](./docs/CONTRIBUTING.md)
- [Monorepo overview](./docs/site/MONOREPO.md)
- [Developing LoopBack](./docs/site/DEVELOPING.md)

You can join the team by posting a comment to
[issue #110](https://github.com/loopbackio/loopback-next/issues/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
[security@loopback.io](mailto:security@loopback.io) with a full description and
steps to reproduce.

See [SECURITY.md](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](https://github.com/loopbackio/loopback-next/graphs/contributors).

### Alumni

- [@ritch](http://github.com/ritch)
- [@superkhau](https://github.com/superkhau)
- [@rashmihunt](https://github.com/rashmihunt)
- [@kjdelisle](https://github.com/kjdelisle)
- [@virkt25](https://github.com/virkt25)
- [@shimks](https://github.com/shimks)
- [@b-admike](https://github.com/b-admike)
- [@deepakrkris](https://github.com/deepakrkris)
- [@bajtos](http://github.com/bajtos)
- [@jannyhou](http://github.com/jannyHou)
- [@emonddr](https://github.com/emonddr)

## License

[MIT](LICENSE)

[raymondfeng]: https://avatars0.githubusercontent.com/u/540892?v=3&s=60
[ritch]: https://avatars2.githubusercontent.com/u/462228?v=3&s=60
[dhmlau]: https://avatars2.githubusercontent.com/u/25489897?v=3&s=60
[jannyhou]: https://avatars2.githubusercontent.com/u/12554153?v=3&s=60
[hacksparrow]: https://avatars2.githubusercontent.com/u/950112?v=3&s=60
[nabdelgadir]: https://avatars0.githubusercontent.com/u/42985749?v=3&s=60
[marioestradarosa]: https://avatars2.githubusercontent.com/u/4633823?v=3&s=60
[yaty]: https://avatars3.githubusercontent.com/u/11981803?v=3&s=60
[emonddr]: https://avatars0.githubusercontent.com/u/6864736??v=3&s=60
[agnes512]: https://avatars3.githubusercontent.com/u/50331796?v=3&s=60
[deepakrkris]: https://avatars0.githubusercontent.com/u/7688315?v=3&s=60
[derdeka]: https://avatars3.githubusercontent.com/u/13640166?v=3&s=60
[dougal83]: https://avatars0.githubusercontent.com/u/2735881?v=3&s=60
[achrinza]: https://avatars3.githubusercontent.com/u/25147899?v=3&s=60
[frbuceta]: https://avatars2.githubusercontent.com/u/13822438?v=4&s=60
[mschnee]: https://avatars0.githubusercontent.com/u/1375316?v=4&s=60
[madaky]: https://avatars3.githubusercontent.com/u/17172989?v=4&s=60
[nflaig]: https://avatars3.githubusercontent.com/u/38436224?v=4&s=60
[samarpanb]: https://avatars.githubusercontent.com/u/13620435?v=4&s=60
[aaqilniz]: https://avatars.githubusercontent.com/u/25802906?v=4&s=60

---

## 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](https://docs.docker.com/engine/installation/) is installed.

### Run the test:

For mocha tests, we use
[testcontainers](https://github.com/testcontainers/testcontainers-node) to
start/stop the fluentd docker container automatically.

The fluentd configuration is read from `fixtures/etc/fluentd.conf`.

```bash
npm test
```

## Contributors

See
[all contributors](https://github.com/loopbackio/loopback-next/graphs/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**

```bash
CLOUDANT_URL= CLOUDANT_HOST=<HOST> CLOUDANT_PORT= CLOUDANT_USERNAME= CLOUDANT_PASSWORD= CLOUDANT_DATABASE=<DATABASE> npm test
```

**Windows**

```bash
SET CLOUDANT_URL=
SET CLOUDANT_HOST=<HOST>
SET CLOUDANT_PORT=
SET CLOUDANT_USERNAME=
SET CLOUDANT_PASSWORD=
SET CLOUDANT_DATABASE=<DATABASE>
npm test
```

### Using 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](https://docs.docker.com/engine/installation/).

- Run the following script

  ```bash
  . setup.sh <HOST>    <DATABASE>
  ```

  Where `<HOST>`, ``, ``, `` and `<DATABASE>` are optional
  parameters. The default values are `localhost`, `5984`, `admin`, `pass` and
  `testdb` respectively.

- The `` and `` you set above will be the admin/password of this
  couchDB3 container.

- Run the test:

  ```bash
  npm test
  ```

## Contributors

See
[all contributors](https://github.com/loopbackio/loopback-next/graphs/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:

```bash
npm test
```

If 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**

```bash
MONGODB_HOST=<HOST> MONGODB_PORT= MONGODB_DATABASE=<DATABASE> npm test
```

**Windows**

```bash
SET MONGODB_HOST=<HOST>
SET MONGODB_PORT=
SET MONGODB_DATABASE=<DATABASE>
npm test
```

### Using 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](https://docs.docker.com/engine/installation/)
  installed, run the following script which would spawn a MongoDB instance on
  your local:

  ```bash
  source setup.sh <HOST>  <DATABASE>
  ```

  Where `<HOST>`, `` and `<DATABASE>` are optional parameters. The default
  values are `localhost`, `27017` and `testdb` respectively.

- Run the test:

  ```bash
  npm test
  ```

## Contributors

See
[all contributors](https://github.com/loopbackio/loopback-next/graphs/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:

```bash
npm test
```

If 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**

```bash
MYSQL_HOST=<HOST> MYSQL_PORT= MYSQL_USER= MYSQL_PASSWORD= MYSQL_DATABASE=<DATABASE> npm test
```

**Windows**

```bash
SET MYSQL_HOST=<HOST>
SET MYSQL_PORT=
SET MYSQL_USER=
SET MYSQL_PASSWORD=
SET MYSQL_DATABASE=<DATABASE>
npm test
```

### Using 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](https://docs.docker.com/engine/installation/)
  installed, run the following script which would spawn a MySQL instance on your
  local:

  ```bash
  source setup.sh <HOST>    <DATABASE>
  ```

  Where `<HOST>`, ``, ``, `` and `<DATABASE>` are optional
  parameters. The default values are `localhost`, `3306`, `root`, `pass` and
  `testdb` respectively.

- Run the test:

  ```bash
  npm test
  ```

## Contributors

See
[all contributors](https://github.com/loopbackio/loopback-next/graphs/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:

```bash
npm test
```

If 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**

```bash
POSTGRESQL_HOST=<HOST> POSTGRESQL_PORT= POSTGRESQL_USER= POSTGRESQL_PASSWORD= POSTGRESQL_DATABASE=<DATABASE> npm test
```

**Windows**

```bash
SET POSTGRESQL_HOST=<HOST>
SET POSTGRESQL_PORT=
SET POSTGRESQL_USER=
SET POSTGRESQL_PASSWORD=
SET POSTGRESQL_DATABASE=<DATABASE>
npm test
```

### Using 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](https://docs.docker.com/engine/installation/)
  installed, run the following script which would spawn a PostgreSQL instance on
  your local:

  ```bash
  source setup.sh <HOST>    <DATABASE>
  ```

  Where `<HOST>`, ``, ``, `` and `<DATABASE>` are optional
  parameters. The default values are `localhost`, `5432`, `root`, `pass` and
  both `repository_tests` and `repository_tests_new` respectively.

- Run the test:

  ```bash
  npm test
  ```

## Contributors

See
[all contributors](https://github.com/loopbackio/loopback-next/graphs/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

```sh
npm run -s benchmark:context
```

For example:

```
npm run -s benchmark:context
```

## Base 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.

- [TrieRouter](https://github.com/loopbackio/loopback-next/tree/master/packages/rest/src/router/trie-router.ts)
- [RegExpRouter](https://github.com/loopbackio/loopback-next/tree/master/packages/rest/src/router/regexp-router.ts)

## Basic use

```sh
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 2560
```

## Base 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      320
```

---

## File: 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 install
```

Run the tests to verify the benchmarked scenarios are working correctly.

```
$ npm test
```

Run the benchmark.

```
$ npm start
```

## Contributions

- [Guidelines](https://github.com/loopbackio/loopback-next/blob/master/docs/CONTRIBUTING.md)
- [Join the team](https://github.com/loopbackio/loopback-next/issues/110)

## Contributors

See
[all contributors](https://github.com/loopbackio/loopback-next/graphs/contributors).

## License

MIT