import dotenv from 'dotenv'; import { buildApp } from './app'; dotenv.config(); const port = Number(process.env.PORT ?? 3003); const app = buildApp(); const start = async () => { const host = '0.0.0.0'; try { await app.listen({ port, host }); console.log(`🚀 Server ready and listening on http://${host}:${port}`); } catch (err) { app.log.error(err); process.exit(1); } }; // Start only when run directly (avoids starting during tests) if (require.main === module) { start(); } /** * Metadatos: * Autor: GitHub Copilot * Última actualización: 2026-02-07 */