Files
SuperSunday/README_API_COMMONJS_FIX.txt
2025-08-25 12:39:54 +00:00

23 lines
642 B
Plaintext

Super Sunday — Patch API: fix CommonJS + routes
===============================================
Problème : l'API plantait avec "require is not defined" car package.json
contenait "type": "module".
Ce patch :
- Force CommonJS (package.json sans "type":"module")
- Fournit un index Express simple + routes (tournaments, participants)
- API écoute sur port 4000 (env PORT)
Installation
------------
unzip -o supersunday_api_commonjs_fix_patch.zip -d .
docker compose build --no-cache api
docker compose up -d api
docker compose logs --since=2m api
Tests
-----
curl -i http://localhost/api/health
curl -s http://localhost/api/tournaments