- Python 3.8.5
- Aiohttp 3.7.4
- PostgreSQL 5.2
- python -m venv
- .\recipes-project\Scripts\activate
- pip install -r requirements.txt
- python app.py
- Create Database 'recipes'
- Run all SQL queries from the file "queries" (creating the necessary tables and filling with test data).
PORT=8080
# variables for DB connection:
DB_DATABASE=recipes
DB_USER=replace_me
DB_PASSWORD=replace_me
DB_HOST=localhost
DB_PORT=5432
curl --request POST \
--url http://localhost:8080/users \
--header 'Content-Type: application/json' \
--data '{
"username": "test",
"email": "[email protected]",
"password": "test"
}'
curl --request GET \
--url http://localhost:8080/users/[username] \
--header 'apikey: ***'
curl --request GET \
--url http://localhost:8080/users/auth \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"password": "test"
}'
curl --request GET \
--url http://localhost:8080/users/top \
--header 'apikey: ***'
curl --request POST \
--url http://localhost:8080/recipes \
--header 'Content-Type: application/json' \
--header 'apikey: ***' \
--data '{
"title": "title",
"description": "description"
}'
curl --request GET \
--url 'http://localhost:8080/recipes?limit=10&offset=0' \
--header 'apikey: ***'
curl --request GET \
--url http://localhost:8080/recipes/[recipe_id] \
--header 'apikey: ***'
- Implement part for favorites recipes
- Add more fields to recipes: type, hashtag, photo and steps
- Implement admin API
- Add pagination for recipes
- Add option to filter recipes