This is a simple REST json API written in Golang for learning purposes.
We use docker to mount Postgresql & PgAdmin. Check docker-compose.yml
for further information.
cp .env.default .env
- Edit .env and set variables
- Run
docker-compose up
to start servers - Run migrations
docker run -v <ABSOLUTE PATH>/migrations:/migrations --network host migrate/migrate -path=/migrations/ -database <CONNECTION STRING> up
- Run
go run main.go
- Go to
http://localhost:8001
with credentials set in docker-compose.yml file.
After changign env variables related to postgres server, you should clear container volumes, to do so:
docker-compose down -v
docker-compose up --force-recreate
Mariano Peyregne