Files
classroomio/apps/api/src/index.ts
T

21 lines
462 B
TypeScript
Raw Normal View History

import 'dotenv/config';
2025-01-18 11:13:05 +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';
import { serve } from '@hono/node-server';
import { showRoutes } from 'hono/dev';
2025-01-18 11:13:05 +01:00
// Start server
function startServer() {
console.log('Starting server on port:', API_PORT);
serve({ fetch: app.fetch, port: API_PORT });
showRoutes(app, { colorize: true });
}
configureOpenAPI(app);
startServer();