Follow these instructions to set up the Modular Player Score Management System on your local in Node.js and Docker.
- Node.js and npm installed on your system.
- Docker installed on your system.
git clone https://github.com/raviranjan2003/ScoreManagementSystem.git
cd ScoreManagementSystem
docker-compose up
docker-compose down
- Note: If step 2 won't work, run the following command
docker build -t modulePlayer .
docker run -p 3000:3000 modulePlayer
curl http://localhost:3000/players
Method | API Endpoints | Request Body | CURL Command |
---|---|---|---|
POST | http://localhost:3000/players | {"name": "Ravi","country": "IN","score": 200} | curl -X POST -H "Content-Type: application/json" -d '{"name": "Ravi","country": "IN","score": 200}' http://localhost:3000/players |
PUT | http://localhost:3000/players/:id (id : 654d3cb2309e38e6adb981b9) | {"name": "Ravi Ranjan","score": 100} | curl -X PUT -H "Content-Type: application/json" -d '{"name": "Ravi Ranjan","score": 100}' http://localhost:3000/players/:id |
DELETE | http://localhost:3000/players/:id | curl -X DELETE http://localhost:3000/players/:id |
|
GET | http://localhost:3000/players | curl http://localhost:3000/players |
|
GET | http://localhost:3000/players/rank/:val | curl http://localhost:3000/players/rank/:val |
|
GET | http://localhost:3000/players/random | curl http://localhost:3000/players/random |