-
You will need to configure Twilio account to send SMS and receive HTTP POST to the application.
You will need Account SID, AUTH Token, and Messaging SID to send SMS.
-
Clone this repository and
cd
into it. -
Create a new virtual environment.
-
If using venv:
python3 -m venv <env name> source <env name>/bin/activate
-
-
Install the requirements using pip.
pip install -r requirements.txt
-
Project is using python-dotenv package to register environment variables automatically imported when you run flask command so you can avoid to set FLASK_APP environment variable to the entry point every time.
-
Run the migrations.
flask db upgrade
-
Start the development server.
flask run
-
To test your webhook use ngrok
To start using
ngrok
in our project you'll have execute to the following line in the command prompt.ngrok http 5000 -host-header="localhost:5000"
Keep in mind that our endpoint is:
http://<your-ngrok-subdomain>.ngrok.io/message
You can run the tests locally through coverage:
-
Run the tests.
$ coverage run test.py
You can then view the results with coverage report
or build an HTML report with coverage html
.