import { createHttpApp } from "./bootstrap/create-http-app.js";
import { createPluginHostRuntime } from "./bootstrap/plugin-host-runtime.js";
export { resolveViteHmrPort } from "./bootstrap/create-http-app.js";
export async function createRudderApp(db, opts) {
    const pluginRuntime = createPluginHostRuntime(db, opts);
    const app = await createHttpApp(db, opts, pluginRuntime);
    await pluginRuntime.start();
    return {
        app,
        async close() {
            await pluginRuntime.close();
        },
    };
}
export async function createApp(db, opts) {
    const handle = await createRudderApp(db, opts);
    return handle.app;
}
//# sourceMappingURL=app.js.map