All Projects → leaderboardsgg → leaderboard-backend-go

leaderboardsgg / leaderboard-backend-go

Licence: GPL-3.0 license
No description, website, or topics provided.

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
shell
77523 projects

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].