Service | Master | Develop |
---|---|---|
Travis CI status | ||
Coveralls |
StackOverflow-lite-ui is a platform where people can ask questions and provide answers.
In your terminal
- Clone the repo locally to your machine by running
git clone https://github.com/krmroland/stackoverflow-lite-ui
- change your current directory (
cd
) to wherever you cloned the app in 1 above.
This api is currently has two versions hosted on heroku;
- Python A general purpose programming language
- Pip A tool for installing python packages
- Virtualenv A tool to create isolated Python environments
- Postgresql An open source relational database
-
Create a virtual environment and activate it
virtualenv venv source /venv/bin/activate
-
Install dependencies
pip3 install requirements.txt
-
Setting environmental variables
Rename
.env.example
to.env
and replace the dummy values with the actual values e.g the database name for both the testing environment and the development environment.
# Delete all tables and recreate them
flask migrate:fresh
python run.py
pytest
#with coverage
pytest pytest -v --cov api/app
End Point | Verb | Use |
---|---|---|
/api/v1.0/ |
GET | API index |
/api/v1.0/questions |
GET | Gets a list of Questions |
/api/v1.0/questions |
POST | Stores a Question resource |
/api/v1.0/questions/<int:id> |
GET | Gets a Question resource of a given ID |
/api/v1.0/questions/<int:id> |
PATCH | Updates a Question resource |
/api/v1.0/questions<int:id> |
DELETE | Deletes a Question resource |
/api/v1.0/questions/<int:id>/answers |
GET | Gets a answers of a specific question |
/api/v1.0/questions/<int:id>/answers |
POST | Adds a an answer to a question |
/api/v1.0/questions/<int:id>/answers/<int:id> |
GET | Gets a specific answer |
/api/v1.0/questions/<int:id>/answers/<int:id> |
UPDATE | Updates an existing answer |
/api/v1.0/questions/<int:id>/answers/<int:id> |
DELETE | Deletes an existing answer |
/api/v1.0/auth/signup |
POST | Creates a user account |
/api/v1.0/auth/login |
POST | Exchanges user credentials with a token |
- Flask A microframework for Python based on Werkzeug, Jinja 2
A Special thanks goes to