webserv
Version:
a quick, flexible, fully typed development server
11 lines (10 loc) • 425 B
TypeScript
/// <reference types="node" />
import { MiddlewareFactory } from '../interface';
import Server from 'http-proxy';
import { IncomingMessage, ServerResponse } from 'http';
export interface ProxyProperties {
baseUrl: string;
proxy?: Server;
onProxyCallback?(error: Error, request: IncomingMessage, response: ServerResponse): Promise<void>;
}
export declare const proxy: MiddlewareFactory<ProxyProperties>;