Files
postplan/src/server.js
T
2026-08-21 20:44:06 -04:00

21 lines
500 B
JavaScript

import { createApp } from "./api.js";
import { config } from "./config.js";
import { ensureBootstrapApiKey, initDb } from "./db.js";
import { assertStorageConfigured } from "./storage.js";
async function main() {
assertStorageConfigured();
await initDb();
await ensureBootstrapApiKey();
const app = createApp();
app.listen(config.port, () => {
console.log(`Postplan listening on port ${config.port}`);
});
}
main().catch((error) => {
console.error(error);
process.exit(1);
});