fh-cds-aufgabe7-backend
v0.0.1
Published
## klaesh.io Backend
Downloads
1
Readme
Concurrent Distributed Systems - Aufgabe 7
klaesh.io Backend
Prerequisites
mongoDB
How to run
npm start -> start server
Database
2 Models:
Player
- id
- name: String
- nickname: String
- created_at: Date
- wins: Number
Game
- id
- player1: player_id
- player2: player_id
- winner: player_id
- turns: Number
- started_at: Date
Routes
GET '/player' -> fetch all player
POST '/player', body { name:'String', nickname: 'String' } -> create new Player
GET '/player/:playerId' -> fetch player
PATCH '/player/:playerId' -> update player
DELETE '/player/:playerId' -> delete player
GET '/games' -> fetch all games
POST '/games', body { player1: 'ID', player2: 'ID', turns: 'Number' } -> create new game
GET '/games/:gameId' -> fetch game
PATCH '/games/:gameId' -> update game
DELETE '/games/:gameId' -> delete game
Contributor
Benjamin Joham Viktoria Maurer