// Copyright IBM Corp. and LoopBack contributors 2020. All Rights Reserved. // Node module: @loopback/example-passport-login // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT import {AuthenticationComponent} from '@loopback/authentication'; import {BootMixin} from '@loopback/boot'; import {ApplicationConfig} from '@loopback/core'; import {RepositoryMixin} from '@loopback/repository'; import {RestApplication} from '@loopback/rest'; import {CrudRestComponent} from '@loopback/rest-crud'; import {ServiceMixin} from '@loopback/service-proxy'; import {MySequence} from './sequence'; export class OAuth2LoginApplication extends BootMixin( ServiceMixin(RepositoryMixin(RestApplication)), ) { constructor(options: ApplicationConfig = {}) { super(options); // Set up the custom sequence this.sequence(MySequence); this.component(AuthenticationComponent); this.component(CrudRestComponent); this.projectRoot = __dirname; // Customize @loopback/boot Booter Conventions here this.bootOptions = { controllers: { // Customize ControllerBooter Conventions here dirs: ['controllers'], extensions: ['.controller.js'], nested: true, }, }; } }