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
+1 -1
View File
@@ -4,7 +4,7 @@
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"start": "node src/app.js", "start": "node src/server.js",
"worker": "node src/worker.js", "worker": "node src/worker.js",
"cleanup": "node src/cleanup.js", "cleanup": "node src/cleanup.js",
"test": "vitest run" "test": "vitest run"
+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);
});