import { Container, interfaces } from 'inversify'; import { InversifyExpressServer } from 'inversify-express-utils'; import { Application as ExpressApplication } from 'express'; import { Middleware } from './kernel/middleware'; import { ErrorMiddleware } from './kernel/errorMiddleware'; import { Bindable } from './kernel/bindable'; import { BindableConstant } from './kernel/bindableConstant'; import { BindableDynamic } from './kernel/bindableDynamic'; export declare class App { /** * Container. * * @protected */ container: Container; /** * Server. * * @protected */ server: InversifyExpressServer; /** * Express Application. * * @protected */ expressApplication: ExpressApplication; /** * Server config. * * @protected */ protected serverConfig: { middleware: Middleware[]; errorMiddleware: ErrorMiddleware[]; port?: number; }; /** * App constructor. */ constructor(); /** * Setup the default config. * * @protected */ protected setupDefaultConfig(): void; /** * Set middleware. * * @param middlewareList */ middleware(middlewareList: Middleware[]): App; /** * Set the middleware error. * * @param errorMiddlewareList */ middlewareError(errorMiddlewareList: ErrorMiddleware[]): App; /** * Set the server port. * * @param port */ port(port: number): App; /** * Bind the targets in container. * * @param bindableList */ bind(bindableList: Bindable[]): App; /** * Bind the targets in constants in container. * * @param bindableList */ bindConstant(bindableList: BindableConstant[]): App; /** * Bind the dynamic targets in container. * * @param bindableDynamicList */ bindDynamic(bindableDynamicList: BindableDynamic[]): App; /** * Get container binding. * * @param identifier * @protected */ protected getContainerBinding(identifier: interfaces.ServiceIdentifier<{}>): interfaces.BindingToSyntax<{}>; /** * Build application. */ build(): App; /** * Setup server config. * * @protected */ protected setupServerConfig(): void; /** * Up the application. */ up(): void; }