feat: add Drizzle enums for schema

Made-with: Cursor
This commit is contained in:
Anton
2026-03-04 13:37:55 +03:00
parent 53525dcd52
commit a7394c4d9d
12 changed files with 749 additions and 0 deletions

26
src/server.ts Normal file
View File

@@ -0,0 +1,26 @@
import 'dotenv/config';
import { buildApp } from './app.js';
import { env } from './config/env.js';
async function main() {
const app = await buildApp();
try {
await app.listen({ port: env.PORT, host: env.HOST });
app.log.info({ port: env.PORT }, 'Server started');
} catch (err) {
app.log.error(err);
process.exit(1);
}
const shutdown = async () => {
app.log.info('Shutting down...');
await app.close();
process.exit(0);
};
process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);
}
main();