Page Contents

Components serve as a vehicle to group 3rd-party contributions to allow easier extensibility of your Application, see Components for more details.

Components can be added to your application using the app.component() method.

The following is an example of installing and using a component.

Install the following dependencies:

npm install --save @loopback/authentication

Load the component in your application:

import {RestApplication} from '@loopback/rest';
import {AuthenticationComponent} from '@loopback/authentication';

const app = new RestApplication();
// Add component to Application, which provides bindings used to resolve
// authenticated requests in a Sequence.