- Install Flask using
pip install flask
- Clone the app using
git clone https://github.com/JSnakegitHub/Challenge-3.git
pip install pytest
pip install coverage report
pip install pytest-cov
pip install pytest-xdist
pip3 install pytest
pip3 install coverage report
pip3 install pytest-cov
pip3 install pytest-xdist
pip install -U virtualenv
python -m virtualenv venv
source venv/bin/activate
# in Windows -> venv\Scripts\activate.batpip install pytest
pip3 install -U virtualenv
python3 -m virtualenv venv
source venv/bin/activate
# in Windows -> venv\Scripts\activate.batpip install pytest
python3 -m venv venv
source venv/bin/activate
# in Windows -> venv\Scripts\activate.batpip install pytest
- If the required endpoints are rendered.
- If the requests are being sent in the right format (JSON-JavaScript Object Notation).
- If Validations are being respected
- Postman should be used to test the application locally
- Move to the project directory locally
- Once you are in the project's root directory, run the command
python run.py
. - At this point the server should be running.
- The application is set to run on port 8080
URL for the route | Function Performed | HTTP Method |
---|---|---|
127.0.0.1:8080/api/v1/questions |
Retrive all questions | GET |
127.0.0.1:8080/api/v1/questions |
Post a question | POST |
127.0.0.1:8080/api/v1/questions/question_id |
Retrieve One Question | GET |
127.0.0.1:8080/api/v1/questions/question_id/answers |
Post Answers to Question | POST |
127.0.0.1:8080/api/v1/questions/question_id |
Deletes a question | DELETE |
127.0.0.1:8080/api/v1/questions/question_id/answers/answer_id |
Accept/Edit an answer | PUT |
127.0.0.1:8080/api/v1/auth/signup |
Register User | POST |
127.0.0.1:8080/api/v1/auth/login |
Login User | GET |
- The app can be deplyed on Heroku following the Heroku Documentation.
Contributions for this project is allowed.
GitHub was used to help track the different versions of the project.
- Walter Nyeko, under supervision of Patrick Walukaga
- This project is licensed under the Andela License