the repository is example for restful api by using flask
docker pull mysql
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password mysql
docker exec -it mysql mysql -uroot -ppassword
- Clone repo
git clone https://github.com/sean830314/flask-restful-example.git
- Setup python virtual environment
cd 'your_repo' python3 -m venv flask_venv source flask_venv/bin/activate
- Installing packages
pip install -r requirements.txt
- Create database
docker exec -i mysql mysql -uroot -ppassword <<< "CREATE DATABASE flask_demo;"
- Run app
python3 app.py
- Generate data
python3 generate.py