GithubHelp home page GithubHelp logo

mohph197 / igl-backend Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 7.52 MB

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

Python 99.77% Shell 0.23%
flask mysql real-estate selenium socket-io unit-testing

igl-backend's Introduction

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

igl-backend's People

Contributors

islemmedjahdi avatar mohph197 avatar nassimam avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.