index.tsx
| 1 | import { createApp } from "./app.ts"; |
| 2 | import config from "./config.ts"; |
| 3 | import { startSshServer } from "./services/sshServer.ts"; |
| 4 | |
| 5 | for (const cmd of ["git", "ssh-keygen"]) { |
| 6 | const result = Bun.spawnSync(["which", cmd]); |
| 7 | if (result.exitCode !== 0) { |
| 8 | console.error(`Missing required command: ${cmd}`); |
| 9 | process.exit(1); |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | await createApp(config.PORT); |
| 14 | if (!config.SSH_DISABLED) await startSshServer(); |
| 15 | console.log(`Hearthforge running at http://localhost:${config.PORT}`); |
| 16 |