@types/http-server
TypeScript icon, indicating that this package has built-in type declarations

0.12.4 • Public • Published

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

import { HandleFunction } from "connect";
import * as http from "http";
import * as https from "https";

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, 07 Nov 2023 03:09:37 GMT
  • Dependencies: @types/connect

Credits

These definitions were written by York Yao.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/http-server

Weekly Downloads

92,530

Version

0.12.4

License

MIT

Unpacked Size

4.58 kB

Total Files

5

Last publish

Collaborators

  • types