Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/widnyana/madara
an example of REST API using gin framework
https://github.com/widnyana/madara
Last synced: 20 days ago
JSON representation
an example of REST API using gin framework
- Host: GitHub
- URL: https://github.com/widnyana/madara
- Owner: widnyana
- License: wtfpl
- Created: 2015-10-23T05:20:45.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-26T06:52:29.000Z (about 9 years ago)
- Last Synced: 2024-12-18T19:27:57.510Z (22 days ago)
- Language: Go
- Size: 121 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sample Rest API using GIN Framework
a tiny example REST API using [Gin Framework][gin], highly influenced by [this repo][gin-boilerplate]
## How to use
setup your base golang workspace, export your `GOPATH`, then execute:
```go get github.com/widnyana/madara```
create `main.go` and add following code:
```
package mainimport (
"github.com/widnyana/madara"
_ "github.com/widnyana/madara/endpoint/users"
)func main() {
app := madara.New()
app.Router.Run("127.0.0.1:8080")
}
```run it with `go run main.go`
if no error, your api is live in `127.0.0.1:8080/users`
## Thanks
- a beautiful yet powerfull [GIN Framework][gin]
- [cornfeedhobo][gin-boilerplate] for his cool boilerplate## License
provided as-is, for educational purpose, responsibility held by the users
see `LICENSE`
[gin]:https://github.com/gin-gonic/gin
[gin-boilerplate]:https://github.com/cornfeedhobo/gin-boilerplate