Every creature action (adopt, feed, play, sleep, kill, revive, delete) and natural deaths from the decay loop are published to the tamagotchi.events topic. Best effort: the database stays the source of truth and Kafka being unavailable never fails a request. Disabled when KAFKA_BROKERS is unset.
19 lines
418 B
JSON
19 lines
418 B
JSON
{
|
|
"name": "tamagotchi-api",
|
|
"version": "1.0.0",
|
|
"description": "Tamagotchi as a Service — Backend API with Prometheus metrics",
|
|
"main": "server.js",
|
|
"scripts": {
|
|
"start": "node server.js",
|
|
"dev": "node --watch server.js"
|
|
},
|
|
"dependencies": {
|
|
"express": "^4.21.0",
|
|
"pg": "^8.13.0",
|
|
"prom-client": "^15.1.0",
|
|
"cors": "^2.8.5",
|
|
"kafkajs": "^2.2.4",
|
|
"uuid": "^10.0.0"
|
|
}
|
|
}
|