Skip to content

dhanarJkusuma/quiz-be

Repository files navigation

This project was built using Golang Programming Language, Redis, MySQL, and Socket.IO

Requirements

  • Golang
  • MySQL
  • Redis
  • Dep Go Dependency Management Tool
  • Node.JS (For Front End Application)

How to start?

  1. Clone the repository
git clone https://github.com/dhanarJkusuma/quiz-be.git quiz
  1. Install Dep, here is the link Dep Golang
  2. Run Redis and MySQL Server
  3. 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
  4. Run MySQL script inside rootProject/migrations/001_init.quiz.sql
  5. Go to root project directory and run script: dep ensure -v
  6. To start the project, run: go run *.go

Available Route

  • Admin Dashboard Login Page: http://localhost:8000/admin/login

Note

About

Quiz Application using golang + socket.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published