gochat
Gochat is a simple chatting application, created for learning purposes.
Running the application
- Gochat uses godotenv to store local env variables. Add
.env
file 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 install
to compile and install all required packages and dependencies. - Run
docker-compose up
to start Gochat API and all required dependencies.
Debugging
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.
Development
Prerequisites
- Install golangci-lint
- Set your IDE to use golangci-lint (instructions)
- Install python3
- Run
git config core.hooksPath .githooks
to wire up project's git hooks - Install migrate CLI
Conventions
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>