core
TWHelp is a project aiming to provide:
- Easy access to Tribal Wars data, for both users and developers.
- Scripts & tools to facilitate gameplay.
Getting started
Development
Setting up the environment
Prerequisites:
- Go (>= 1.19)
- Node.js (LTS, needed for commitlint)
- Kubernetes (>= 1.25.0)
- minikube
- Docker Desktop
- Docker CLI
- Skaffold
- pre-commit
- IDE/Code editor (e.g. Goland, VSCode, vim, neovim)
- direnv (optional, but recommended)
# if you have direnv installed
direnv allow
# install git hooks and required tools
make install
# run all required services
skaffold run --port-forward=true --tail=true
# stop all of them
skaffold delete
Running unit tests
At least one of the following is required to run unit tests:
- Docker (dockertest will spin up a database)
- Postgres database
# Docker
go test -v ./...
# Postgres database
TESTS_DB_DSN=postgres://twhelp:twhelp_pass@127.0.0.1/twhelp go test -v ./...
Creating a new database migration
# create a migration
go run ./cmd/twhelp/main.go db create go migration 1
Configuration options
Configuration options can be specified via environment variables.
License
Distributed under the MIT License. See LICENSE
for more information.
Dawid Wysokiński - contact@dwysokinski.me