- Open bash
- Clone project
- Create virtual environments
- Activate it
- sudo service redis-server start
- sudo docker-compose build
- sudo docker-compose up
Now, for the best work you need to install Postman
- Create a message:
- Select a POST method in Postman;
- In URL type http://127.0.0.1:5000/message;
- Key must be 'text' and value must be 'test_message' for example
- Copy generated id
- Add tag to message:
- Select a POST method in Postman;
- In URL type http://127.0.0.1:5000/tag/*id_you_copied*;
- Key must be 'text' and value must be 'test_tag' for example
- Add comments to message:
- Select a POST method in Postman;
- In URL type http://127.0.0.1:5000/comment/*id_you_copied*;
- Key must be 'text' and value must be 'test_comment' for example
- Show message data:
- Select a GET method in Postman;
- In URL type http://127.0.0.1:5000/message/*id_you_copied*;
- Show message statistics:
- Select a GET method in Postman;
- In URL type http://127.0.0.1:5000/stats/*id_you_copied*;
- { "comments": [ { "text": "comment" } ], "message": "This message has 2 tags and 1 comments", "ok": true, "tags": [ { "text": "tag" }, { "text": "tag2" } ] }