/*! * @copyright FLYACTS GmbH 2018 */ import { Action } from '@flyacts/routing-controllers'; import { CorsOptions } from 'cors'; import { Application } from 'express'; import { Connection, ConnectionOptions } from 'typeorm'; import { VersionInformation } from './interfaces/version-information.interface'; import { Logger } from './providers/logger.provider'; /** * A generic initializer of our backend */ export declare class Backend { connection: Connection; express: Application; logger: Logger; private controllers; private versionInformation; private constructor(); /** * Launch the listen port and optional explorer */ start(): Promise; /** * Create a new backend instance and configure it */ static create(typeOrmConfig: ConnectionOptions | Connection, controllers: Function[], middlewares: Function[], versionInformation: VersionInformation, authorizationChecker?: (action: Action, roles: string[]) => Promise, currentUserChecker?: (action: Action) => Promise, development?: boolean, cors?: boolean | CorsOptions, validation?: boolean, defaultErrorHandler?: boolean): Promise; }