"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const app_1 = require("./app");
const env_1 = require("./env");
async function start() {
    const { port, host } = env_1.env;
    const app = await (0, app_1.createServer)();
    await app.listen({ port, host });
    app.log.info(`local server listening on http://${host}:${port}`);
    app.core.sysLog.append({
        level: "info",
        text: `Server started at http://${host}:${port}`,
        source: "server",
        scope: "system",
    });
}
start().catch((err) => {
    console.error("Failed to start server:", err);
    process.exit(1);
});
