import express from 'express';

const app = express();
app.use(express.json({ limit: '64kb' }));

app.post('/api/roast', async (req, res) => {
  const content = String(req.body?.content ?? '');
  if (!content.trim()) return res.status(400).json({ text: 'Missing content' });

  // TODO: server-side provider call
  return res.status(501).json({ text: 'Not implemented' });
});

app.listen(8080, () => {
  console.log('Server listening on http://localhost:8080');
});
