1 | /**
|
2 | * The live-server start params.
|
3 | */
|
4 | export interface LiveServerParams {
|
5 | /** Set the server port. Defaults to 8080. */
|
6 | port?: number | undefined;
|
7 | /** Set the address to bind to. Defaults to 0.0.0.0 or process.env.IP. */
|
8 | host?: string | undefined;
|
9 | /** Set root directory that's being served. Defaults to cwd. */
|
10 | root?: string | undefined;
|
11 | /** When false, it won't load your browser by default. */
|
12 | open?: boolean | undefined;
|
13 | /** Comma-separated string for paths to ignore. */
|
14 | ignore?: string | undefined;
|
15 | /** When set, serve this file (server root relative) for every 404 (useful for single-page applications). */
|
16 | file?: string | undefined;
|
17 | /** Waits for all changes, before reloading. Defaults to 0 sec. */
|
18 | wait?: number | undefined;
|
19 | /** Mount a directory to a route. */
|
20 | mount?: string[][] | undefined;
|
21 | /** 0 = errors only, 1 = some, 2 = lots */
|
22 | logLevel?: 0 | 1 | 2 | undefined;
|
23 | /** Takes an array of Connect-compatible middleware that are injected into the server middleware stack. */
|
24 | middleware?: Array<(req: any, res: any, next: any) => void> | undefined;
|
25 | }
|
26 |
|
27 | /**
|
28 | * Start live-server.
|
29 | */
|
30 | export function start(params: LiveServerParams): void;
|
31 |
|
32 | /**
|
33 | * Shutdown live-server.
|
34 | */
|
35 | export function shutdown(): void;
|