https://github.com/damien-hl/greenlight
Retrieve and manage movies through a JSON API
https://github.com/damien-hl/greenlight
Last synced: 7 months ago
JSON representation
Retrieve and manage movies through a JSON API
- Host: GitHub
- URL: https://github.com/damien-hl/greenlight
- Owner: damien-hl
- Created: 2023-03-04T18:30:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-01T15:19:01.000Z (about 2 years ago)
- Last Synced: 2025-01-31T16:19:20.370Z (9 months ago)
- Language: Go
- Size: 77.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Greenlight
> Retrieve and manage movies through a JSON API
[](https://forthebadge.com) [](https://forthebadge.com)
## Setup
### 1. Create a Docker container for PostgreSQL
```bash
docker run -d --name greenlight-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 postgres
```### 2. Connect to the PostgreSQL container
```bash
docker exec -it greenlight-postgres psql -U postgres
```### 3. Create a migration using golang-migrate
```bash
migrate create -seq -ext=.sql -dir=./migrations name_of_the_migration_here
```### 4. Execute the migration
```bash
migrate -path=./migrations -database="postgres://greenlight:&P455word\$@localhost/greenlight?sslmode=disable" up
```