소스 검색

[FEAT] add readme

Adrien Carteron 2 년 전
부모
커밋
1ab7809b1d
1개의 변경된 파일58개의 추가작업 그리고 0개의 파일을 삭제
  1. 58 0
      README.md

+ 58 - 0
README.md

@@ -0,0 +1,58 @@
+# Implementation
+
+## Requirements
+* Gradle
+* Mongodb
+
+## Compile
+```
+gradle build
+```
+## Run
+```
+unzip build/distributions/playerRank-0.0.1.zip -d <location>
+/<location>/playerRank-0.0.1/bin/playerRank
+```
+starts web server with api: http://localhost:8080/
+
+## Run test
+```
+gradle test --tests "re.chasam.models.impl.TournamentImplTest"
+gradle test --tests "re.chasam.models.impl.PlayerTest"
+```
+
+## Mongo connexion
+Its access follows the format:
+```
+scheme://host:port
+```
+to access to a db and use collection.
+Defaults parameters can be overriden using environments variables:
+```
+SCHEME
+HOST
+PORT
+NAME
+COLLECTION
+```
+
+## Docker
+
+```
+cd Docker
+docker compose up
+```
+
+## API
+### GET /players  
+lists all players with name score and rank
+### GET /player/{id}
+get a player score and its rank
+### POST /players {"name":"a name"}
+add a new player, its score and rank are set to 0
+### PATCH /players/{id} {"score":42}
+set the score of a player
+### DELETE /players
+remove all players
+
+