$ pipenv run deploy
..env
file.Important: The boiplerplate is made for python 3.7 but you can easily change the
python_version
on the Pipfile.
The following steps are automatically runned withing gitpod, if you are doing a local installation you have to do them manually:
pipenv install;
mysql -u root -e "CREATE DATABASE example";
pipenv run init;
pipenv run migrate;
pipenv run upgrade;
There is an example API working with an example database. All your application code should be written inside the ./src/
folder.
For a more detailed explanation, look for the tutorial inside the docs
folder.
You have to migrate and upgrade the migrations for every update you make to your models:
$ pipenv run migrate (to make the migrations)
$ pipenv run upgrade (to update your databse with the migrations)
⚠️ Make sure you have python 3.6+
and MySQL
installed on your computer and MySQL is running, then run the following commands:
$ pipenv install (to install pip packages)
$ pipenv run migrate (to create the database)
$ pipenv run start (to start the flask webserver)
This template is 100% compatible with Heroku[https://www.heroku.com/], just make sure to understand and execute the following steps:
// Install heroku
$ npm i heroku -g
// Login to heroku on the command line
$ heroku login -i
// Create an application (if you don't have it already)
$ heroku create <your_application_name>
// Commit and push to heroku (commited your changes)
$ git push heroku master
:warning: For a more detailed explanation on working with .env variables or the MySQL database read the full guide.