Node.js API that sits between your MySQL database and the Yazanaki Fabric mod.
-
Copy
.env.exampleto.envand fill in your values:- DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME → your MySQL credentials
- API_PORT → port to listen on (default 3000)
- API_SECRET → a long random string (the mod must send this in every request)
-
Install dependencies: npm install
-
Start the server: npm start
All endpoints require the header: X-API-Secret:
GET /health → confirms the server and DB are reachable GET /members → returns all active empire members GET /member/:username → look up a single player by Minecraft username