You opened this file directly in the browser (file:// protocol).
Browsers block all fetch/API calls from file:// due to CORS security rules —
no backend change can fix this.
You need to serve this HTML from a local server. Pick any option below:
Option 1 — Node.js (npx)
npx serve .
Option 2 — Python
python -m http.server 8080
Option 3 — VS Code
Install the Live Server extension → right-click this HTML file → "Open with Live Server"
After running the command above, open http://localhost:3000 (or the port shown) in your browser.