It is an API that enables CRUD methods for creating a Diary entry where users can can pen dwn their feelings
Clone the repository:
https://github.com/Nduhiu17/MyDiary.git
Check out to the server branch by: $git checkout develop
Ensure you have the following:
1. postgres
2. python3.6
3. Flask
4. Postman
Create a virtualenv and activate it by running the following commands.
$python3.6 -m venv virtual
$source virtual/bin/activate
- Install the project dependencies:
$ pip install -r requirements.txt
You can run the tests by running:
$
pytest
After setting up the above. Run the application by:
$```FLASK_APP=app flask run``
Test the endpoints registered on Postman:
1.End point to registering a user
https://diary-server.herokuapp.com/api/v1/register/
- End point to login in a user
https://diary-server.herokuapp.com/api/v1/login/
- End point to get all entries
https://diary-server.herokuapp.com/api/v1/entries/
- End point to get a single entry
https://diary-server.herokuapp.com/api/v1/entries/0
- End point to add an entry.
https://diary-server.herokuapp.com/api/v1/entries/
- End point to update an entry.
https://diary-server.herokuapp.com/api/v1/entries/2
- End point to delete an entry.
https://diary-server.herokuapp.com/api/v1/entries/1
Please click on the link below to view the user interface design
https://nduhiu17.github.io/MyDiary/
Antony Nduhiu