Skip to content

TP IGL: A Web application for the publication and consultation of real estate advertisements

Notifications You must be signed in to change notification settings

mohph197/IGL-Backend

Repository files navigation

Real Estate Web App Backend (TP IGL)

Requirements

  1. To run the project you need to have Python 3.x
  2. To host the database install mysql in your machine and import/run This File
  3. 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

  4. To run functional tests you need the following:
    1. Make sure you have Google Chrome Browser installed in your environment
    2. Download the chrome driver with a version similar to your chrome version
      Download link: Chrome Drivers

Environement Variables

  1. Create the .env file:
    cp .env.example .env
  2. 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)

Install Dependencies

pip install -r requirements.txt

Run The App

python run.py

Run Tests

  • Make sure your backend and frontend apps are running (for functional tests)
  • This command will run all the tests (unit and functional):
pytest -v

About

TP IGL: A Web application for the publication and consultation of real estate advertisements

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •