Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gtsopour/go-rest-mongodb
RESTful API with Go and MongoDB
https://github.com/gtsopour/go-rest-mongodb
compile-daemon go golang mongo-go-driver mongodb mux rest-mongodb viper
Last synced: 3 months ago
JSON representation
RESTful API with Go and MongoDB
- Host: GitHub
- URL: https://github.com/gtsopour/go-rest-mongodb
- Owner: gtsopour
- Created: 2019-10-29T07:03:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-27T16:32:25.000Z (almost 5 years ago)
- Last Synced: 2024-06-21T19:56:54.053Z (8 months ago)
- Topics: compile-daemon, go, golang, mongo-go-driver, mongodb, mux, rest-mongodb, viper
- Language: Go
- Size: 29.3 KB
- Stars: 10
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# REST API with Go and MongoDB
REST API with Golang and MongoDB.
* HTTP router
* CRUD operations
* MongoDB supported driver for Go
* ENV configurations
* Formatted logs## Dependencies
``go get github.com/gorilla/mux``
``go get go.mongodb.org/mongo-driver/mongo``
``go get github.com/spf13/viper``
``go get github.com/githubnemo/CompileDaemon``## Build
``go build``## Run
``ENV=dev ./go-rest-mongodb``
``ENV=prod ./go-rest-mongodb``## Watch
``CompileDaemon -command="./go-rest-mongodb"``## API
### Postman collection
[Postman collection](/postman-collection.json)## Resources
mux: A powerful HTTP router and URL matcher for building Go web servers. https://github.com/gorilla/muxmongo-driver: The MongoDB supported driver for Go. https://github.com/mongodb/mongo-go-driver
viper: Viper is a complete configuration solution for Go applications including 12-Factor apps. https://github.com/spf13/viper
CompileDaemon: Watches your .go files in a directory and invokes go build if a file changed. https://github.com/githubnemo/CompileDaemon