UNPKG

@whook/whook

Version:

Build strong and efficient REST web services.

25 lines (24 loc) 1.08 kB
import http from 'node:http'; import { type Provider } from 'knifecycle'; import { type LogService } from 'common-services'; import { type WhookHTTPRouterService } from './httpRouter.js'; export type WhookHTTPServerEnv = { DESTROY_SOCKETS?: string; }; export type WhookHTTPServerOptions = Pick<http.Server, 'timeout' | 'headersTimeout' | 'requestTimeout' | 'keepAliveTimeout' | 'maxHeadersCount' | 'maxRequestsPerSocket'> & Partial<Pick<http.Server, 'maxConnections'>>; export type WhookHTTPServerConfig = { HOST?: string; PORT?: number; HTTP_SERVER_OPTIONS?: Partial<WhookHTTPServerOptions>; }; export type WhookHTTPServerDependencies = WhookHTTPServerConfig & { ENV?: WhookHTTPServerEnv; HOST: string; PORT: number; httpRouter: WhookHTTPRouterService; log?: LogService; }; export type WhookHTTPServerService = http.Server; export type WhookHTTPServerProvider = Provider<WhookHTTPServerService>; declare const _default: import("knifecycle").ProviderInitializer<WhookHTTPServerDependencies, WhookHTTPServerService>; export default _default;