An app to forecast weather of a city.
- Postgres
- Golang
- Go Migrations. Refer
https://github.com/golang-migrate/migrate
.
- Create the db by running
make create-db
. - Add the database string to
config/development.yaml
. - Run
make run
to run the migrations, build the app and run the server. - Create test db using
psql postgres -c "create database weather_monster_test;"
. - Update the db string in
tests/config/test.yaml
. - Run
make test
to run all the tests.
- Run
docker-compose up
to run postgres and the app. - The dev config files need to point to the bootstrapped db.
- Run
make test
to run all the tests - Run only controller tests with
go test ./test/controllers/ -v
- Make sure you run test migrations using
make migrate-test-db
- Run
make migrate-dev-db
for dev db and Runmake migrate-test-db
before running tests.
- Run
psql postgres -c "create database weather_monster;"
ormake create-db
- Gorm for db connections
- Go Migration. Refer
https://github.com/golang-migrate/migrate
- Gin for Building API's.
- Ginkgo as a BDD test framework.
- Gomega for test matchers.