UNPKG

963 BTypeScriptView Raw
1import { HandleFunction } from "connect";
2import * as http from "http";
3import * as https from "https";
4
5export function createServer(options?: Options): http.Server | https.Server;
6
7export interface Options {
8 root?: string | undefined;
9 headers?: { [name: string]: string } | undefined;
10 cache?: number | undefined;
11 showDir?: boolean | "false" | undefined;
12 autoIndex?: boolean | "false" | undefined;
13 showDotfiles?: boolean | undefined;
14 gzip?: boolean | undefined;
15 contentType?: string | undefined;
16 ext?: boolean | undefined;
17 before?: HandleFunction[] | undefined;
18 logFn?: ((req: http.IncomingMessage, res: http.ServerResponse, err: Error) => void) | undefined;
19 cors?: boolean | undefined;
20 corsHeaders?: string | undefined;
21 robots?: string | true | undefined;
22 proxy?: string | undefined;
23 https?: https.ServerOptions | undefined;
24 username?: string | undefined;
25 password?: string | undefined;
26}
27
\No newline at end of file