Skip to content
Snippets Groups Projects
Select Git revision
  • clement
  • master default
  • fix_requirements
  • new_signup
  • interface_admin
  • hamza
  • dev
  • test
  • melissa
  • context_sheet
  • sorties_new
  • Seon82-patch-2
  • export_bdd
  • refactor/participation-user-link
14 results

tests

  • Clone with SSH
  • Clone with HTTPS
  • README

    Run the server-side FastAPI app

    In development mode

    You can start a virtual environment with the following instructions.

    $ cd backend
    $ python3.9 -m venv env
    $ source env/bin/activate

    Then you need to install the dependencies by executing pip install -r requirements.txt
    Comment the app service in the docker-compose.yml then build and run the file.
    Start the development server running python -m uvicorn main:app --reload --port=3001 --host 0.0.0.0

    Navigate to http://localhost:3001


    Le linter

    So the new commits can be deployed, you'll need to use the linter from backend :
    pycodestyle --config=./setup.cnf --exclude=./env ./
    You can use autoformat with autopep8 running :
    autopep8 --in-place --global-config=./setup.cnf --recursive --exclude=./env --aggressive ./


    In production mode

    Build the docker image : docker-compose build
    Run the server, docker-compose up -d


    Run the client-side React app in a different terminal window:

    $ cd frontend
    $ npm install
    $ npm run start

    Navigate to http://localhost:3000