codex-lv4-may-2025

Level Navigation: 1 2 3 (4ℹ️) (5ℹ️) 6 7 8 9 10 11 12 13 14⚡ 15⚡ (16ℹ️) 17 18 19 20 21 22 23 24 25 26⚡ 27⚡ 28⚡ 29 30 31 32 33 34 35 36 37 38 39⚡ 40⚡

Level 11: Create a JSON Route

Create a new route called “Happy Birthday” that returns JSON. Add a GET /happy-birthday route (or similar path) that returns a JSON object with:

Use res.json() to send the response. Test it in Postman to see the JSON formatted response.

Show Me: happy birthday JSON route

app.get('/happy-birthday', (req, res) => {
  res.json({
    name: 'Alice',
    age: 25,
    greeting: 'Happy Birthday! 🎉'
  });
});