lisk-framework
Version:
Lisk blockchain application platform
24 lines (23 loc) • 762 B
TypeScript
/// <reference types="node" />
import * as HTTP from 'http';
import { Logger } from '../../logger';
export type HTTPRequestListener = (req: HTTP.IncomingMessage, res: HTTP.ServerResponse, message: string) => void;
export declare class HTTPServer {
server: HTTP.Server;
private readonly _port;
private readonly _host?;
private readonly _path;
private readonly _ignorePaths;
private readonly _accessControlAllowOrigin;
private _logger;
constructor(options: {
port: number;
host?: string;
path?: string;
ignorePaths?: string[];
accessControlAllowOrigin?: string;
});
start(logger: Logger, httpRequestListener: HTTPRequestListener): HTTP.Server;
stop(): void;
listen(): void;
}