https://github.com/willdady/mediams
MediaMS is a Go microservice exposing a RESTful API for managing media and albums (groups of media) in a PostgreSQL database
https://github.com/willdady/mediams
golang media microservice postgres postgresql rest-api
Last synced: 6 months ago
JSON representation
MediaMS is a Go microservice exposing a RESTful API for managing media and albums (groups of media) in a PostgreSQL database
- Host: GitHub
- URL: https://github.com/willdady/mediams
- Owner: willdady
- Created: 2019-02-10T00:55:18.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-10T00:57:49.000Z (about 7 years ago)
- Last Synced: 2025-01-26T17:15:25.788Z (about 1 year ago)
- Topics: golang, media, microservice, postgres, postgresql, rest-api
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MediaMS
MediaMS is a Go microservice exposing a RESTful API for managing media and albums (groups of media) in a PostgreSQL database.
Note this is built with the intention of being used as an internal microservice and should only be exposed via an API Gateway (or GraphQL) layer.
## Requirements
MediaMS requires access to a Postgres database. Connection details must be provided as environment variables. The default values are as follows:
```
PG_HOST=0.0.0.0
PG_PORT=5432
PG_USER=postgres
PG_DB=postgres
PG_PASSWORD=mysecretpassword
PG_SSL_MODE=disable
PORT=8080
```
In production you should also disable [gin's](https://github.com/gin-gonic/gin) debug logging:
```
GIN_MODE=production
```
## Development
Run a Postgres database easily with Docker:
```
docker run --rm -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 postgres:11.1
```
Run the app:
```
go run cmd/postms/postms.go
```