0.12.4 • Published 6 months ago
@types/http-server v0.12.4
Installation
npm install --save @types/http-server
Summary
This package contains type definitions for http-server (https://github.com/indexzero/http-server#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-server.
index.d.ts
// Type definitions for http-server 0.12
// Project: https://github.com/indexzero/http-server#readme
// Definitions by: York Yao <https://github.com/plantain-00>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as http from "http";
import * as https from "https";
import { HandleFunction } from "connect";
export function createServer(options?: Options): http.Server | https.Server;
export interface Options {
root?: string | undefined;
headers?: { [name: string]: string } | undefined;
cache?: number | undefined;
showDir?: boolean | "false" | undefined;
autoIndex?: boolean | "false" | undefined;
showDotfiles?: boolean | undefined;
gzip?: boolean | undefined;
contentType?: string | undefined;
ext?: boolean | undefined;
before?: HandleFunction[] | undefined;
logFn?: ((req: http.IncomingMessage, res: http.ServerResponse, err: Error) => void) | undefined;
cors?: boolean | undefined;
corsHeaders?: string | undefined;
robots?: string | true | undefined;
proxy?: string | undefined;
https?: https.ServerOptions | undefined;
username?: string | undefined;
password?: string | undefined;
}
Additional Details
- Last updated: Tue, 06 Jul 2021 21:33:37 GMT
- Dependencies: @types/connect
- Global values: none
Credits
These definitions were written by York Yao.