/// <reference types="node" />
import type http from 'http';
import type { AstroConfig } from '../../@types/astro-core';
import type { LogOptions } from '../logger';
import type { HmrContext, ModuleNode } from '../vite';
import connect from 'connect';
export interface DevOptions {
    logging: LogOptions;
}
interface DevServer {
    hostname: string;
    port: number;
    server: connect.Server;
    stop(): Promise<void>;
}
/** `astro dev` */
export default function dev(config: AstroConfig, options?: DevOptions): Promise<DevServer>;
/** Dev server */
export declare class AstroDevServer {
    app: connect.Server;
    httpServer: http.Server | undefined;
    hostname: string;
    port: number;
    private config;
    private logging;
    private manifest;
    private mostRecentRoute?;
    private origin;
    private routeCache;
    private viteServer;
    constructor(config: AstroConfig, options: DevOptions);
    start(): Promise<void>;
    stop(): Promise<void>;
    handleHotUpdate({ file, modules }: HmrContext): Promise<void | ModuleNode[]>;
    /** Expose dev server to this.port */
    listen(devStart: number): Promise<void>;
    private createViteServer;
    /** The primary router (runs before Vite, in case we need to modify or intercept anything) */
    private handleRequest;
    /** Render error page */
    private renderError;
}
export {};
