Hi!
If you read this file it means that you are developing your (first?) microservice using Flask and Flakon!
Now, let's start with a quick explanation of this skeleton:
This is the structure of your first microservice:
bedrock_a_party
├── app.py
├── __init__.py
├── tests
│ ├── __init__.py
│ └── test_home.py
└── views
├── home.py
├── __init__.py
As you can see, we have bedrock_a_party
, that is the service you are going to develop.
If you want, you can change the name of it (it does not generate problems).
To setup the environment, you should follow these steps:
- Open the project in your IDE.
- From IDE terminal, or normal Ubuntu/MacOS terminal execute the command
virtualenv venv
inside project root. - Now, you have to activate it, by executing the command
source venv/bin/activate
. - You have to install all requirements, let's do that with
pip install -r requirements.txt
.
Perfect! now you can run flask application!
WARNING: each time that you open a new terminal session you have to execute the step 3.
If you want to run the application, you can use the script run.sh
by typing bash run.sh
,
or you can set these environment variables:
FLASK_DEBUG=1
FLASK_ENV=development
FLASK_APP=bedrock_a_party