2025-09-21 19:35:41 +01:00
|
|
|
import 'dotenv/config';
|
2025-01-18 11:13:05 +01:00
|
|
|
|
2025-11-24 01:00:50 +01:00
|
|
|
import { API_PORT } from '@api/constants';
|
2025-11-01 15:49:29 +01:00
|
|
|
import { app } from '@api/app';
|
|
|
|
|
import { configureOpenAPI } from '@api/utils/openapi';
|
2025-09-21 19:35:41 +01:00
|
|
|
import { serve } from '@hono/node-server';
|
|
|
|
|
import { showRoutes } from 'hono/dev';
|
2025-01-18 11:13:05 +01:00
|
|
|
|
2025-09-21 19:35:41 +01:00
|
|
|
// Start server
|
|
|
|
|
function startServer() {
|
2025-11-24 01:00:50 +01:00
|
|
|
console.log('Starting server on port:', API_PORT);
|
2025-09-21 19:35:41 +01:00
|
|
|
|
2025-11-24 01:00:50 +01:00
|
|
|
serve({ fetch: app.fetch, port: API_PORT });
|
2025-09-21 19:35:41 +01:00
|
|
|
|
|
|
|
|
showRoutes(app, { colorize: true });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
configureOpenAPI(app);
|
|
|
|
|
|
|
|
|
|
startServer();
|