This is the final project of NTU 113-1 Web App course.
git clone https://github.com/rongzunzzz/113-1-WebApp-Final.git
git switch backend
or
git switch frontend
git pull origin main
Make sure you are under directory your/local/path/113-1-WebApp-Final/
, and enter either
git add frontend/(backend/)
git commit -m "some message"
git push origin dev/frontend(backend)
cd backend
MONGO_URI=Your_Mongo_URI
python3 -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
Run Django server.(http://localhost:8000)
python manage.py runserver
cd frontend
If you use npm
then use the corresponding syntax/commands.
yarn
Run frontend(http://localhost:5173)
yarn run dev
python manage.py makemigrations
python manage.py migrate
python manage.py runserver
curl -X POST http://127.0.0.1:8000/api/saveTest/ \
-H "Content-Type: application/json" \
-d '{
"test_id": "test123",
"title": "Sample Test",
"questions": ["What is your name?", "What is your age?"],
"results": ["Result A", "Result B"],
"backgroundImage": "http://example.com/image.jpg",
"user_id": "user456"
}'