import { Server as NodeHttpServer } from 'http'; import { Server as NodeHttpsServer, ServerOptions as HttpsServerOptions } from 'https'; export { NodeHttpServer, NodeHttpsServer, HttpsServerOptions }; export interface HttpServer extends NodeHttpServer {} export interface HttpsServer extends NodeHttpsServer {} export type HttpServerProtocolType = 'http' | 'https'; export interface HttpServerInstance { protocol: HttpServerProtocolType; server: TServer; port: number; } export interface WebServerStartupOptions { http?: WebServerConfigOptions; https?: WebServerHttpsConfigOptions; } export interface WebServerHttpsConfigOptions extends WebServerConfigOptions {} export interface WebServerConfigOptions { port?: number; enabled?: boolean; } export interface HttpServerInstances { http?: HttpServerInstance; https?: HttpServerInstance; } export interface WebServerConfigStaticPath { filePath: string; urlPath: string; } export interface WebServerSslConfigOptions { certFilePath: string; keyFilePath: string; passphrase?: string; dhparamFilePath: string; } export interface WebServerOptions { startup: WebServerStartupOptions; ssl?: WebServerSslConfigOptions; staticPaths?: WebServerConfigStaticPath[]; keys?: string[]; }