Versions Compared

Key

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

Debugging

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

...

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 Code


...

Servers

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

...

Postman is useful for sending HTTP requests to the back-end APIs. 

  1. Install Postman
  2. CheckoutBackend Online Mobile APIs  for Backend Online APIs

...

Notes (mobile)

Samples are identified by their barcode ids. If submit two surveys with the same barcode, then the latest submitted survey will replace the old one. Even if different users use the same barcode, the sample will get replaced. So when testing, if you do not scan a barcode, the sample will always be stored as no barcode, and the database will always only store the latest survey.