import app from '@/index';
import { logger } from '@/lib/logger';

const port = Number(Bun.env.PORT ?? 3000);
const hostname = Bun.env.HOST ?? '0.0.0.0';

const server = Bun.serve({
  hostname,
  port,
  fetch: app.fetch,
});

logger.info({ url: `http://${server.hostname}:${server.port}` }, 'backend_listening');
