This project is to learn the Go language, Gin framework, and GORM (Go ORM). Also to learn more about docker and docker-compose, mostly creating the dockerfile and also how everything is connected.
-
Install postgres https://www.postgresql.org/
-
Set up your environment variables. For me, Currently I have them in my .zshrc file since I plan on using docker compose to set them up.
export BANK_HOST=localhost export BANK_USER=postgres export BANK_PASSWORD=postgres export BANK_DB=bank_challenge export BANK_PORT=5432
-
Run the necessary migrations (currently just one)
> go run migrate/2024_03_16_migrate.go
-
Build and run the app
> go build . > ./bank_challenge # alternatively you can also just run the app > go run .
- TODO