Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Debugging

After cloning your codebase from GitHub, now it's time to write/debug code.

Probably you won't yet have every required library installed, but worry not! We use docker container to standardise everything (versions/libraries).

In one word, you'll find it more convenient and elegant to write/debug code in docker container env (instead of on your laptop's local env).

Read the doc below to know how.

By Docker

  1. Download Docker Desktop
  2. Clone and go to the file path
  3. build the image
    1. docker build -t "image_name:latest" .
  4. run the image
    1. docker run -d -p 5000:5000 image_name

By local virtual machine

  • start a virtual machine
Code Block
languagebash
titlesource venv/bin/activate
python3 -m venv venv


  • activate the virtual machine
Code Block
languagebash
titlesource venv/bin/activate
source venv/bin/activate
  • use pip to install pkgs
Code Block
languagebash
titlesource venv/bin/activate
pip install -r requirements.txt
  • run the program
    Code Block
    languagebash
    titlesource venv/bin/activate
    flask run --debug

By Visual Studio CodeDev/Debug in Container


...

Servers

The test server can be accessed from MongoDB Atlas, please follow the MongoDB Atlas section in this guide.

...