Run a game statistics micro-service built with NestJs
Service depends on container capitalisers/coding-test-game-data for game data service.
Services caches remote service data in 1 hour and retries failed requests in 5 minutes
stats/login
- Authenticate a sample user and getJWT (Json Web Token)
(id: ea, password: changeme
)
After getting the token use Bearer Token authorization on subsequent requests
-
stats
- get all statistics -
stats/grouped
- get all statistics grouped by first letter -
stats/top
- get top 5, 10 and 100 statistics -
stats/top:number
- get top statistics for the providednumber
argument
You can run the project locally or through docker
docker pull capitalisers/coding-test-game-data
and map port8080
and start the containernest start
to start the service on port3000
docker-compose up
to build and start containers
(first request to game data service will fail so it use a cached file. After 5 minutes data service will be hit again, this time with success and new game data)