import Fastify from 'fastify';
import { healthRoutes } from './routes/health.js';

const app = Fastify({ logger: true });
app.register(healthRoutes);

const port = Number(process.env['PORT'] ?? 8080);
app.listen({ port }, (err) => {
  if (err) { app.log.error(err); process.exit(1); }
});
