// Copyright IBM Corp. and LoopBack contributors 2019. All Rights Reserved. // Node module: @loopback/example-lb3-application // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT import {BootMixin} from '@loopback/boot'; import {Lb3AppBooterComponent} from '@loopback/booter-lb3app'; import {ApplicationConfig} from '@loopback/core'; import {RepositoryMixin} from '@loopback/repository'; import {RestApplication} from '@loopback/rest'; import {RestExplorerComponent} from '@loopback/rest-explorer'; import path from 'path'; import {MySequence} from './sequence'; export class CoffeeShopApplication extends BootMixin( RepositoryMixin(RestApplication), ) { constructor(options: ApplicationConfig = {}) { super(options); // Set up the custom sequence this.sequence(MySequence); // Set up default home page this.static('/', path.join(__dirname, '../public')); this.component(RestExplorerComponent); this.component(Lb3AppBooterComponent); this.projectRoot = __dirname; // Customize @loopback/boot Booter Conventions here this.bootOptions = { controllers: { // Customize ControllerBooter Conventions here dirs: ['controllers'], extensions: ['.controller.js'], nested: true, }, lb3app: { mode: 'fullApp', }, }; } }