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:
Running tests with coverage:
Running tests with race detection (requires gcc
):
Running benchmarks: