UNPKG

@methodus/server

Version:

Server components for @methodus workflow

30 lines (29 loc) 925 B
import 'reflect-metadata'; import { MethodusConfig, PluginEntry } from '@methodus/framework-decorators/commons'; import { MethodHandler } from './method/handlers/method.handler'; import { MethodPipeHandler } from './method/handlers/pipe.handler'; export interface IApp { set(key: string, value: any): void; } export declare class Server { app: any; config?: MethodusConfig; serverKey: string; _app: any; httpServer: any; httpsServer: any; port: number; ipAddress: string; private _plugins; instanceId: string; methodHandler: MethodHandler; methodPipeHandler: MethodPipeHandler; constructor(port?: number | string, app?: any, httpServer?: any); makeid(): string; plugins(plugins: PluginEntry[]): this; configure(config: MethodusConfig): this; useClient(_class: any): void; start(): Promise<this>; useClass(_class: any): void; kill(): void; }