June 2017
Beginner to intermediate
274 pages
6h 49m
English
To do a test run of our microservice, we need to start up Flask (using the following command) and tell it to serve our microservice:
For Unix/Linux and macOS, run the following command:
export FLASK_APP=demo_flaskpython3 -m flask run
For Windows, run the following command:
set FLASK_APP=demo_flaskpython3 -m flask run
The demo_flask package also contains a module called test.py that we can use as a client that connects to our microservice and put it through its paces. It will add, delete, list, and modify a couple of database entries and also try out a bad post request to show that the error handling is working.
There's one more part of the Flask demo microservice that we haven't talked about and won't in ...
Read now
Unlock full access