UNPKG

@microfleet/core

Version:
30 lines (29 loc) 835 B
import { Plugin, ServerOptions } from '@hapi/hapi'; import { Microfleet } from '../../../..'; import { PluginInterface } from '../../../../types'; import { HapiRouterConfig } from './router/attach'; export interface HapiPlugin { plugin: string | Plugin<any>; options?: any; once?: boolean; } export interface HapiPluginConfig { server: { handlerConfig: { server: ServerOptions; plugins: { list: any[]; options?: any; }; views?: any; }; host?: string; port?: number; attachSocketIO?: boolean; }; router: HapiRouterConfig & { enabled: boolean; }; } declare function createHapiServer(config: HapiPluginConfig, service: Microfleet): PluginInterface; export default createHapiServer;