server

command module
v0.0.0-...-abd2ee0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 5 Imported by: 0

README

Binquiz Server App

A go based application to play Binquiz. The game itself is multiplayer and will be moderated by a quizmaster and some players in the teams. Stay tuned in for the first event.


Table of contents

  • Technology
    • External Comms
    • Package structure
    • Installation
    • Launch application
    • Test application
    • Environment Variables
    • Building Image
    • Dependencies
  • Author

Technology

External Comms
  • MongoDB client for storing entitites and relationships.
  • Web sockets networking for seamless quizzing experience with every player getting an update at the same time.
  • Jwt Token is used for authenticating any REST api requests. A new token is sent out to a user when they login.

Package structure
core
├───actions
├───comms
├───db
├───errors
├───models
├───services
├───tests
└───utils

Installation
  • The instructions for installation are the following. Please run them inorder.
go get -d -v ./...
go mod download
go mod vendor
go mod verify

Launch application

Start the service as a go application by running

go run main.go

Test application

Test the go application with coverage by running

go test -v -cover ./...

Environment Variables
  • MONGO_CLIENT_ID = <MONGO_CLIENT_ID>
  • PORT = <SERVER_PORT>
  • GAME_DATABASE = <DATABASE_NAME>
  • SSL_KEY = <PATH_TO_KEY_FILE>
  • SSL_CERT = <PATH_TO_CERT_FILE>

Building Image

The images reside in DockerHub. To build a docker image, run the following command in the repository's root directory.

docker build . -t atulanand206/binquiz-server:vx.x

Once the image is built, push it out to DockerHub so that it can be consumed by the production server.

docker push atulanand206/binquiz-server:vx.x

Dependencies

Author

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL