Note: Requires Python v3.6.9 and Postgres v14.6 installed
- Clone the github project on your local machine
- (Optional) Create a virtual environment and activate it
- Change dir to stackunderflow_backend
- Install the dependencies by running
pip install -r requirements.txt
- Change dir to stackunderflow
- Apply Django Migrations by running
./manage.py migrate
- Finally run the server by running
./manage.py runserver
-
JWT tokens:
- POST
/stackunderflow/api/token/
- POST
/stackunderflow/api/token/refresh
- POST
-
Questions
- GET
/stackunderflow/api/questions/{question_id}
- GET
/stackunderflow/api/questions/
- POST
/stackunderflow/api/questions/
- PATCH
/stackunderflow/api/questions/{question_id}
- DELETE
/stackunderflow/api/questions/{question_id}
- GET
-
Answers
- GET
/stackunderflow/api/questions/{question_id}/answers/{answer_id}
- GET
/stackunderflow/api/questions/{question_id}/answers/
- POST
/stackunderflow/api/questions/{question_id}/answers/
- PATCH
/stackunderflow/api/questions/{question_id}/answers/{answer_id}
- DELETE
/stackunderflow/api/questions/{question_id}/answers/{answer_id}
- GET
-
Question Comments
- GET
/stackunderflow/api/questions/{question_id}/comments/{comment_id}
- GET
/stackunderflow/api/questions/{question_id}/comments/
- POST
/stackunderflow/api/questions/{question_id}/comments/
- PATCH
/stackunderflow/api/questions/{question_id}/comments/{comment_id}
- DELETE
/stackunderflow/api/questions/{question_id}/comments/{comment_id}
- GET
-
Answer Comments
- GET
/stackunderflow/api/answers/{answer_id}/comments/{comment_id}
- GET
/stackunderflow/api/answers/{answer_id}/comments/
- POST
/stackunderflow/api/answers/{answer_id}/comments/
- PATCH
/stackunderflow/api/answers/{answer_id}/comments/{comment_id}
- DELETE
/stackunderflow/api/answers/{answer_id}/comments/{comment_id}
- GET