- Install go1.18.1
- Run postgres with centrifugo:
docker-compose up -d postgres centrifugo
- Copy file
.env.sample
to.env
- Run migrations with env variables from .env file:
export $(cat .env | xargs); sql-migrate up
go run cmd/websocketmanager/main.go
docker-compose up -d
go install github.com/rubenv/sql-migrate/sql-migrate@latest
sql-migrate new MIGRATION_NAME
export $(cat .env | xargs); sql-migrate up
go install github.com/golangci/golangci-lint/cmd/[email protected]
Or https://golangci-lint.run/usage/install/#local-installation
golangci-lint run
After API changes call swag to regenerate documentation
At first, you need to download swag tool (v1.8.1) https://github.com/swaggo/swag#getting-started
Regenerate documentation
swag init -g internal/config/routes/routes.go -ot go
- Run
cd tests/integration
- Run
yarn install
- Copy file
tests/integration/.env.sample
totests/integration/.env
- Run tests
yarn test