A flask + mongodb api.
- The project suppose to use a local version of mongodb
- Create a virtual env
# Windows
python -m venv venv
- Activate the virtual env
# Windows
venv\Scripts\activate
- Install flask
pip install Flask
- Run mongodb in another terminal
mongod
- Execute flask
flask run
GET /games
Show the list of all the games
POST /games
Create a new game like the example below
{
"name": "game name"
}
PUT /games/:id
Update the name of the game. Example below:
{
"name": "New game name"
}
DELETE /games/:id
Delete the given element