This project was built using Golang Programming Language, Redis, MySQL, and Socket.IO
- Golang
- MySQL
- Redis
- Dep Go Dependency Management Tool
- Node.JS (For Front End Application)
- Clone the repository
git clone https://github.com/dhanarJkusuma/quiz-be.git quiz
- Install Dep, here is the link Dep Golang
- Run Redis and MySQL Server
- Setting your config in
env.json
{ "base_url": "localhost:8000", "quiz": { "number_of_question": 2, "ready_count_down": 3, "count_down": 3, "template_path": "C://Users/BN001706734/go/src/github.com/dhanarJkusuma/quiz/templates" }, "database": { "address":"127.0.0.1:3306", "name": "quiz_2", "user": "root", "password": "" }, "redis": { "address": "127.0.0.1:6379", "password": "" }, "jwt": { "secret_key": "A1gW8lAPwN" } }
- `base_url`: your backend base url.
- `number_of_question`: total number of question that asked for user.
- `ready_count_down`: countdown before quiz is started
- `count_down`: countdown during quiz
- `template_path`: html template path
- `secret_key`: get the random string for security purpose
- Run MySQL script inside
rootProject/migrations/001_init.quiz.sql
- Go to root project directory and run script:
dep ensure -v
- To start the project, run:
go run *.go
- Admin Dashboard Login Page: http://localhost:8000/admin/login
- Run Quiz-Front-End project, to start quiz application.
- If you want to run Redis for Windows, here I'm using this app Redis For Windows