tree-house
Version:
NodeJS utilities and handy helpers extending ExpressJS functionalities
20 lines (19 loc) • 655 B
TypeScript
/// <reference types="node" />
import { Application } from 'express';
import * as http from 'http';
export declare function startServer(app: Application, options: ServerOptions): Promise<void>;
export declare function preHook(fn: Function): Promise<void>;
export declare function postHook(fn: Function, httpServer: http.Server): Promise<void>;
export interface ServerOptions {
port: number;
title?: string;
https?: {
port: number;
privateKey: string;
certificate: string;
};
headersTimeout?: number;
keepAliveTimeout?: number;
pre?: Function;
post?: (server: http.Server) => void | Promise<void>;
}