add project

This commit is contained in:
ZOMBIIIIIII
2026-04-08 14:11:27 +03:00
parent bfa95223a0
commit a81e29807c
115 changed files with 18413 additions and 0 deletions

23
apps/api/src/index.ts Normal file
View File

@@ -0,0 +1,23 @@
import knex from 'knex';
import knexConfig from './db/knexfile';
import app from './app';
import { env } from './config/env';
async function main() {
const db = knex(knexConfig);
console.log('[API] Running migrations...');
await db.migrate.latest();
console.log('[API] Migrations complete.');
await db.destroy();
app.listen(env.port, () => {
console.log(`[API] Server running on port ${env.port}`);
});
}
main().catch((err) => {
console.error('[API] Failed to start:', err);
process.exit(1);
});