Online demo can be found here: https://lootlocker-quiz.fly.dev/
Showcasing creating a quiz system using Golang serving REST API endpoints and static frontend content such as HTML, CSS and VanillaJS. The system consists of an administration frontend interface and a user frontend interface. Each quiz has an unique quiz code, which enables participants to join a quiz quickly. See TODO.md for plans ahead for the project.
- Golang installed (I used version 1.22)
- MariaDB/MySQL database available
- Setup database structure from
"migrations"
folder - Adjust
.env
file for SQL credentials and HTTP(S) ports
cd
to\cmd\server\
directory- execute
go run main.go
- Go to https://localhost - if hosted locally
- Requires OpenAI API key
- You can use the argument 'generate' followed by a subject, f.eg:
go run .\cmd\server\ generate top40 music
- and the software will generate a quiz on that subject using OpenAI
- Project is setup supporting Fly.io continous deployment, and secrets can be set with f.eg:
flyctl secrets set DB_USER=quiz
as an alternative to the.env
file