feat: add server entry point

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-30 09:20:25 +02:00
co-authored by Claude Sonnet 5
parent ba5756e122
commit ceccc1d1af
2 changed files with 21 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
import { loadConfig } from './config.js';
import { getPool } from './db.js';
import { ensureStorageDirs } from './storage.js';
import { createApp } from './app.js';
async function main() {
const config = loadConfig();
await ensureStorageDirs(config);
const pool = getPool(config);
const app = createApp(config, pool);
app.listen(config.port, () => {
console.log(`File converter API listening on port ${config.port}`);
});
}
main().catch((error) => {
console.error('Failed to start server:', error);
process.exit(1);
});