/go-api-movie

API Movie built in Golang Echo Framework, with PostgreSQL RAW for data storage, Redis for caching, Testify and Docker Container

Primary LanguageGo

Api Movie ✨

Technologies - Libraries

This app required 2 database connection

# run postgreSQL
docker run -d -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=api_movie postgres

# run redis
docker run -d -p 6379:6379 redis --requirepass "masukredis"

Test

Run below command to run test, and make sure that all tests are passing

go test -v ./...

Runing App

  1. Copy config.example.yaml to config.yaml and fill the config
AppVersion:

Server:
  Port: :
  Development:
  ReadTimeout:
  WriteTimeout:

Postgres:
  Host:
  Port:
  User:
  Password:
  DbName:

Redis:
  Host:
  Port:
  Password:
  1. Runing app docker-compose.yaml
make docker-compose

or

$ docker docker-compose up -d --build
  • After run this, don't forget to check all container are successfully started