import { mkdir } from "fs/promises";
import app from "./app";
import { config } from "./lib/config";
import { startWorker } from "./lib/workflow-runner";
import { startAutopilot } from "./lib/autopilot";
import { ensureDemoContent } from "./lib/demo-seed";
await mkdir(config.gitReposPath, { recursive: true });
startWorker();
startAutopilot();
if (process.env.DEMO_SEED_ON_BOOT === "1") {
void ensureDemoContent().catch(() => {});
}
console.log(`
gluecron v0.1.0
──────────────────────
http://localhost:${config.port}
repos: ${config.gitReposPath}
`);
export default {
port: config.port,
fetch: app.fetch,
};
|