- Clone the project:
git clone git@github.com:lmcuongdev/BE-Project.git
cd ./BE-Project
- Set up virtual environment:
python3 -m venv venv
source venv/bin/activate
- Install project dependencies:
pip install -r requirements.txt
- Use MySQL shell to run the database setup
>mysql create database db;
>mysql use db;
>mysql source database.sql;
- Create and update the the correct configuration to the .env file
cp .env.example .env
To start running an instance of the server on local machine
flask run --port 8888
First create a new database for testing, then run the database setup again
>mysql create database test_db;
>mysql use test_db;
>mysql source database.sql;
Configure the .env file, and run the tests
pytest --cov --cov-config=.coveragerc --cov-report html
The test coverage files can be found in htmlcov folder