Mergeforces service is a hands-on example of a complete web application written in Go for the purposes of applying knowledge gained from self learning and creating an open source project that provides free user group listings.
To build run the web service on http://localhost:8080
:
docker-compose up --build
Once the database has started, you will need to use psql
or a client like postico
to connect to the running postgres instance and create the mergeforces_app
database:
psql postgres://postgres:postgres@0.0.0.0:5432
CREATE DATABASE mergeforces_app;
To run all tests within the repository:
go test ./...
Migrations will be run automatically upon restarting the application; however to run migraitons manually:
goose postgres "user=postgres dbname=mergeforces_app sslmode=disable" status
goose postgres "postgres://postgres:postgres@0.0.0.0:5432/mergeforces_app?sslmode=disable" up
Install golangci-lint
via brew install golangci/tap/golangci-lint
and run linting:
golangci-lint run