sitcon-tw / Camp2024-Drawing-Competition-Backend

A Python Turtle Judge Challenge System
Other
1 stars 2 forks source link
django django-rest-framework python turtle

Drawing Competition Backend


Prerequisite


Getting Start - API Server

Init Env

poetry install # Install Dependencies
poetry shell # In Project root

Migrate Database

python manage.py makemigrations # Check Model Context modification
python manage.py migrate # Migrate Migrations to Database

Run Server

python manage.py runserver [0.0.0.0:8000] # Run Server
# 0.0.0.0:8000 mean output to all IP

Run Server HTTPS Dev Mode

python manage.py runserver_plus --key-file selftest-key --cert-file selftest-cert 0.0.0.0:8000

Getting Start MQTT Publisher

Init Env

poetry shell # In Project root
python manage.py migrate django_celery_beat

Run Publisher

celery -A backend worker --loglevel=info