Install Python 3.9, pip and clone this project:
git clone https://github.com/ntt261298/flask_catalog.git
Setup the virtual environment:
pip install virtualenv
virtualenv env
source env/bin/activate
Install the requirement:
pip install -r requirements.txt
Local
ENV=local python run.py
Development
ENV=development python run.py
Production
ENV=production python run.py
Without coverage
pytest tests/*
With coverage
pytest --cov=main tests/*
Install mysql and run the server:
mysql.server start
Create local and test database:
mysql -u root -p
create database flask_catalog
create database flas_catalog_test
Init migration repository
flask db init
Create database migration:
flask db migrate
Apply migration to database:
flask db upgrade