https://github.com/itwars/docker-golang-rest-mongodb-nginx
🐳🐳🐳 An example of Docker REST API with Golang, MongoDB and Nginx
https://github.com/itwars/docker-golang-rest-mongodb-nginx
docker docker-stack docker-swarm golang mongodb nginx-proxy restful-api
Last synced: 7 months ago
JSON representation
🐳🐳🐳 An example of Docker REST API with Golang, MongoDB and Nginx
- Host: GitHub
- URL: https://github.com/itwars/docker-golang-rest-mongodb-nginx
- Owner: itwars
- Created: 2017-10-17T20:05:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-11-13T11:04:04.000Z (about 3 years ago)
- Last Synced: 2025-04-04T05:51:12.422Z (9 months ago)
- Topics: docker, docker-stack, docker-swarm, golang, mongodb, nginx-proxy, restful-api
- Language: Go
- Homepage: http://www.it-wars.com/posts/virtualisation/docker-exemple-golang-mongodb-rest-api/
- Size: 85.9 KB
- Stars: 41
- Watchers: 4
- Forks: 16
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# An example of Docker Stack deployment of a Golang RESTful API connected to MongoDB, behind an NGINX proxy

## Introduction
This repository is part of my blog post on [Docker golang rest mongodb nginx](http://www.it-wars.com/posts/virtualisation/docker-exemple-golang-mongodb-rest-api/).
## Howto build a REST API using Golang connected to a NOSQL MongoDB Database and protected behind a NGINX proxy
To illustrate this purpose, I built a *golang app* that serve and store informations from *MongoDB*
Get app status:
```bash
curl -k -H "Content-Type: application/json" https:///app-back-status 2>/dev/null | jq
```
Store new record:
```bash
curl -k -d '{"nom":"RABAH", "prenom":"Vincent", "telephone":"0000000"}' -H "Content-Type: application/json" -X POST https:///contacts
```