/// <reference types="node" />
import * as http from 'http';
import { App } from './app';
import { FileAppStore } from './file_app_store';
import { Bridge } from './bridge/bridge';
import { LocalRuntime } from './local_runtime';
import { Runtime } from './runtime';
export interface RequestMeta {
    app?: App;
    startedAt?: [number, number];
    endedAt?: [number, number];
    id?: string;
    originalURL?: string;
}
declare module 'http' {
    interface IncomingMessage {
        protocol: string;
    }
}
export interface ServerOptions {
    env?: string;
    appStore?: FileAppStore;
    bridge?: Bridge;
    inspect?: boolean;
}
export interface RequestTask {
    request: http.IncomingMessage;
    response: http.ServerResponse;
}
export declare class Server extends http.Server {
    options: ServerOptions;
    bridge: Bridge;
    runtime: LocalRuntime;
    appStore: FileAppStore;
    constructor(options?: ServerOptions);
    private handleRequest;
}
export declare function handleRequest(rt: Runtime, req: http.IncomingMessage, res: http.ServerResponse): Promise<number>;
