https://github.com/aitumik/greenlight
Greenlight
https://github.com/aitumik/greenlight
docker go postgresql
Last synced: about 2 months ago
JSON representation
Greenlight
- Host: GitHub
- URL: https://github.com/aitumik/greenlight
- Owner: aitumik
- Created: 2022-02-04T11:50:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-18T11:19:14.000Z (over 3 years ago)
- Last Synced: 2025-02-08T07:41:13.536Z (over 1 year ago)
- Topics: docker, go, postgresql
- Language: Go
- Homepage:
- Size: 148 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Greenlight
## Introduction
Greenlight is an API for handling events and movies
## Setup
Setting up the database
Create the volume
```bash
mkdir -p ${HOME}/postgresql/data
```
Create network
```bash
docker network create greenlight-net
```
Start postgres
```bash
docker run -it -d --name greenlightdb -e POSTGRES_USER=greenlight -e POSTGRES_DB=greenlight -e POSTGRES_PASSWORD=greenlight -v ${HOME}/postgresql/data:/var/lib/postgresql -p 5432:5432 --net greenlight-net postgres:latest
```
## Events API
```bash
curl -X POST http://localhost:8000/v1/events \
-H "Content-Type: application/json" \
-d '{
"start_time": "2025-04-15T14:00:00Z",
"end_time": "2025-04-15T16:00:00Z",
"title": "Sample Event",
"description": "This is a description of the event.",
"venue": "Sample Venue",
"tags": ["Tag1", "Tag2"],
"cover": "http://example.com/cover.jpg"
}'
```