Greenlight is a JSON API for retrieving and managing information about movies built with Go.
- Clone the repository:
git clone https://github.com/ashvwinn/greenlight.git
cd greenlight-
Set environment variables (look at .env.example for reference)
-
Setup database with Docker Compose:
docker compose up -d- Run database migrations with the
migratetool:
migrate -path=./migrations -database=$GREENLIGHT_DB_DSN up- Start the application:
With
goor withair
air
# or
go run ./cmd/api
# or
go build -o bin/main ./cmd/api
./bin/main