Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

leaderboardsgg/leaderboard-backend-go

Repository files navigation

leaderboard-backend

An open-source community-driven leaderboard backend for the gaming community.

Links

Tech-Stack Information

  • This repository only contains the backend, and not the UI for the website.
  • GoLang is used for implementing the backend.
  • JSON API with JWT Authentication

Developing

Requirements

  • Go 1.16+.
  • Make to run build scripts.
  • Docker to run the database and admin interface.

Optional

  • golangci-lint to run CI linting on your machine.
  • staticcheck for linting that will integrate with your editor.
  • gcc to run race detection on unit tests.

Useful links

  • VSCode is a pretty good editor with helpful GoLang plugins.
  • GoLand is JetBrains' Go offering and is very fully featured.
  • A Tour of Go is a great place to learn the basics of how to use GoLang.
  • Effective Go is the best place to check to learn recommended best practices.
  • Set up git is GitHub's guide on how to set up and begin using git.
  • How to Contribute to an Open Source Project is a useful guide showing some of the steps involved in opening a Pull Request.

How to run

To start the postgres docker container

  • docker-compose up -d
  • Go to localhost:1337 for an Adminer interface

To test HTTP endpoints:

  • make run or make build and run the binary
  • Make requests to localhost:3000/api/v1 (or whatever port from .env)

Running tests:

  • go test ./...

Running tests with coverage:

  • make test

Running tests with race detection (requires gcc):

  • make test_race

Running benchmarks:

  • make bench

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published