13 lines
301 B
TypeScript
13 lines
301 B
TypeScript
|
|
import * as url from 'url';
|
||
|
|
export interface ISimpleRequest {
|
||
|
|
headers: {};
|
||
|
|
parsedUrl: url.URL;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ISimpleResponse {
|
||
|
|
headers: { [key: string]: string };
|
||
|
|
status: number;
|
||
|
|
body: string | Buffer;
|
||
|
|
}
|
||
|
|
export type IRenderFunction = (req: ISimpleRequest) => Promise<ISimpleResponse>;
|