SETUP
-
Install flask, flask-SQLchemy $ pip install flask, Flask-SQLAlchemy
-
Install the virtual environment to run the program $ pip3 install virutalenv
-
create virtual environment $ virtualenv myenv
-
Activate virtual environment $ source myenv/bin/activate
-
Run the program $ python3 app.py
-
See the program run on below address $ localhost:5000
-
Update the localhost port if necessary in the 'app.py' $ app.run(debug=True, port=5000)
MICROSERVICE A INSTRUCTIONS This microservice is responsible for handling goals including adding, updating and removing the goals.
- Enter your goal and then click 'Add Goal'
- Goal is entered, date added is displayed and an actions column
- If you need to update the goal click 'Update' in the actions column
- To delete a goal no longer relevent or achieved, click 'Delete'
UML Sequence Diagram
COMMUNICATION CONTRACT - Examples A) Request Data - Add a Goal - Endpoint '/api/goals' - Method: POST - Host: http://localhost:5000 - Content-Type: application/json
B) Receive Data - Once goal is added, Microservice A responds to the goal including the goal's 'id', 'content' & 'date_created' { 'id': 1, 'content': 'Goal is to complete setup for Microservice A', 'date_created': 2024-05-20' }
