- To run the project you need to have Python 3.x
- To host the database install mysql in your machine and import/run This File
- For google authentication you need to download the file client_secret.json associated to your google app and place it in the following path:
/app/auth/client_secret.json
- To run functional tests you need the following:
- Make sure you have Google Chrome Browser installed in your environment
- Download the chrome driver with a version similar to your chrome version
Download link: Chrome Drivers
- Create the .env file:
cp .env.example .env
- Add the following variables to your .env file:
- GOOGLE_CLIENT_ID: The client id of your google app (for google login)
- HOST_URL: The url where your backend app is hosted
- DATABASE_URL: The url of your database
- SECRET_KEY: A secret key of your choice
- JWT_ALGORITHM: The algorithm used to encode the jwt token (HS256, RS256, etc...)
- CHROME_WEB_DRIVER_PATH: The path to the chrome driver we downloaded earlier
- FRONTEND_URL: The url of your frontend app
- TEST_TOKEN: A valid jwt token to be used in functional tests (you can generate one using the /auth endpoint)
pip install -r requirements.txt
python run.py
- Make sure your backend and frontend apps are running (for functional tests)
- This command will run all the tests (unit and functional):
pytest -v