Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/willdady/postms
PostMS is a Go microservice exposing a RESTful API for managing blog-like posts and comments in a PostgreSQL database
https://github.com/willdady/postms
blog golang microservice postgres postgresql rest-api
Last synced: about 1 month ago
JSON representation
PostMS is a Go microservice exposing a RESTful API for managing blog-like posts and comments in a PostgreSQL database
- Host: GitHub
- URL: https://github.com/willdady/postms
- Owner: willdady
- Created: 2018-12-17T06:10:53.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-16T04:09:54.000Z (almost 6 years ago)
- Last Synced: 2024-10-15T01:43:48.218Z (3 months ago)
- Topics: blog, golang, microservice, postgres, postgresql, rest-api
- Language: Go
- Size: 13.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PostMS
PostMS is a Go microservice exposing a RESTful API for managing blog-like posts and comments 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
PostMS 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
```