Gochat is a simple chatting application, created for learning purposes.
- Gochat uses godotenv to store local env variables. Add
.envfile to the root directory, with following structure:
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_DB=
POSTGRES_PORT=
POSTGRES_HOST=
PGADMIN_DEFAULT_EMAIL=
PGADMIN_DEFAULT_PASSWORD=
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=
API_SECRET=
GOCHAT_ADMIN_PASSWORD=
GOCHAT_ADMIN_EMAIL=
- Run
go installto compile and install all required packages and dependencies. - Run
docker-compose upto start Gochat API and all required dependencies.
There is VSC launch configuration available in the repository. In order to run Gochat API using VSC debugging, run docker-compose up postgres redis or ./scripts/run_deps.sh, and then start [Gochat] Launch API VSC configuration.
- Install golangci-lint
- Set your IDE to use golangci-lint (instructions)
- Install python3
- Run
git config core.hooksPath .githooksto wire up project's git hooks - Install migrate CLI
This repository follows ConventionalCommits specification for creating commit messages. There is prepare-commit-msg hook set up to ensure following those rules. Branch names should also reflect the type of work it contains - one of following should be used:
feature/<task-description>bugfix/<task-description>chore/<task-description>