- Run Docker
- Copy
app.sample.env
to app.env
and make necessary changes
$ make up
- Server should be running on port 3001
curl -L -d '{"name": "Hamza"}' localhost:3001/accounts
curl -L localhost:3001/accounts
curl -L -d '{"amount": 100}' localhost:3001/accounts/1/deposit
curl -L -d '{"amount": 100}' localhost:3001/accounts/1/withdraw
curl -L -d '{"amount": 100, "from_account_id": 1, "to_account_id": 2}' localhost:3001/transfer
- Run a postgres server (
make db_dev
)
go test -v ./...
- Check
app.env
- HOST
(should be: 127.0.0.1)