- Framework gin-gonic/gin
- Clean Architecture
- Dependency injection
- Docker
- DataBase: Postgres
- Migration files generation with migrate
- Logging: logrus
- JWT: jwt-go
- ...
Server will wait for postgres
docker-compose up --build go-todo-app
Stop
docker-compose down
Run postgres
docker pull postgres
docker run --name=todo-db -e POSTGRES_PASSWORD='postgres' -p 5436:5432 -d --rm postgres
docker ps
Installation
irm get.scoop.sh | iex
scoop install migrate
Migration files generation
migrate create -ext sql -dir ./schema -seq init
Apply migration to db
migrate -path ./schema -database 'postgres://postgres:postgres@0.0.0.0:5436/postgres?sslmode=disable' up
Check migration
docker ps
docker exec -it <id> powershell # /bin/bash
psql -U postgres
\d
Migrate down
migrate -path ./schema -database 'postgres://postgres:postgres@0.0.0.0:5436/postgres?sslmode=disable' down