Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilgooz/stack
Go RESTful API Stack w/ MongoDB
https://github.com/ilgooz/stack
Last synced: 7 days ago
JSON representation
Go RESTful API Stack w/ MongoDB
- Host: GitHub
- URL: https://github.com/ilgooz/stack
- Owner: ilgooz
- Created: 2015-09-18T00:31:34.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-06T20:02:53.000Z (about 9 years ago)
- Last Synced: 2024-11-01T02:34:24.281Z (14 days ago)
- Language: Go
- Homepage:
- Size: 232 KB
- Stars: 49
- Watchers: 10
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Stack [![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](http://godoc.org/github.com/ilgooz/stack)
> Stack is a lightweight not-a-framework RESTful API that allow you to easily get started with your next project and show some of the *my* best practices about building RESTful APIs in Go.![](https://cdn.rawgit.com/ilgooz/stack/master/logo.jpg)
## What is included?
* Proper using of middlewares
* Learn how to organize your files & folders structure
* User & Token APIs out of the box
* Authentication via tokens
* Keep context by *http.Request with gorilla/context
* Form parsing with gorilla/schema & validation with go-playground/validator
* MongoDB with go-mgo/mgo
* Command-line configuration
* App versioning over latest git commit hash
* ...### Usage
##### Run
make run
##### Run via Docker Compose
docker-compose up
##### Stop
^C *ctrl+c*
##### Hard Stop
^C^C *twice*### Out of The Box Endpoints
* post /users
* get /users
* get /users/{id}
* get /me
* post /tokens
* delete /tokens
* delete /tokens/{token}
* get /version### Authentication
Send your *access_token* over *X-Auth-Token* header> For more information read the source code and do requests on endpoints
## Best practices resources about building APIs
* GopherCon 2015: Blake Caldwell - Uptime: Building Resilient Services with Go https://www.youtube.com/watch?v=PyBJQA4clfc## Contribute
* Share your ideas by opening new issues
* Feel free to ask for feature requests