Skip to content

qim-center/qim-platform

Repository files navigation

Steps for Local Development

  1. First, get the platform and database in place

    • git clone git@github.com:qim-center/qim-platform.git
    • flask db init
    • flask db migrate
    • flask db upgrade
  2. Create your branch from prod

    • git checkout dev
    • git pull
    • git branch your-branch-name
    • git checkout your-branch-name
    • git status

    That should give you:

    On branch your-branch-name
    nothing to commit, working tree clean
    
  3. Start the FastAPI using uvicorn

    • uvicorn main:app --reload

    This should give you something like:

    (dev) fima@pop-os ~/qim-platform $ uvicorn main:app --reload
    INFO:     Will watch for changes in these directories: ['/home/fima/qim-platform']
    INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
    INFO:     Started reloader process [507195] using StatReload
    [2023-11-21 10:42:36] <Flask> (INFO) → Starting Flask
    [2023-11-21 10:42:36] <FastAPI> (INFO) → Starting FastAPI
    INFO:     Started server process [507197]
    INFO:     Waiting for application startup.
    INFO:     Application startup complete.
    

The server local version of the server can be accessed at the provided address, http://127.0.0.1:8000 in this case.

Any changes in the code will be automatically updated because of the --reload flag.

⚠️ Pay attention to the address bar in your browser to be sure you’re at the local version! Some links or apps might send you directly to the prod version of the platform.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 7