This guide explains how to set up a development environment for Retro AIM Server and build/run the application. It assumes that you have little to no experience with golang.
Before you can run Retro AIM Server, set up the following software dependencies.
Since Retro AIM Server is written in go, install the latest version of golang.
If you're new to go, try Visual Studio Code wth the go plugin as your first IDE.
A C compiler is required in order to build the sqlite dependency.
If you have git, this is likely already set up on your machine.
xcode-select --install
sudo apt install build-essential
Install the tdm-gcc compiler.
Mockery is used to generate test mocks. Install this dependency and regenerate the mocks if you change any interfaces.
go install github.com/vektra/mockery/v2@latest
Run the following command in a terminal from the root of the repository in order to regenerate test mocks,
mockery
To run the server using go run, run the following script from the root of the repository. The default settings can be
modified in config/settings.env.
scripts/run_dev.sh
To build the server binary:
go build -o retro_aim_server ./cmd/server
To run the binary with the settings file:
source config/settings.env
./retro_aim_server
Retro AIM Server includes a test suite that must pass before merging new code. To run the unit tests, run the following command from the root of the repository in a terminal:
go test -race ./...