Skip to content

Commit

Permalink
Quick first documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Lhussiez committed Aug 30, 2017
1 parent 49fc803 commit 2823ad1
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# go-gin-prometheus
===
[![](https://godoc.org/github.com/zsais/go-gin-prometheus?status.svg)](https://godoc.org/github.com/zsais/go-gin-prometheus)
Gin Web Framework Prometheus metrics exporter

## Installation

`$ go get github.com/zsais/go-gin-prometheus`

## Usage

```go
package main

import (
"github.com/gin-gonic/gin"
"github.com/zsais/go-gin-prometheus"
)

func main() {
r := gin.New()

p := ginprometheus.NewPrometheus("gin")
p.Use(r)

r.GET("/", func(c *gin.Context) {
c.JSON(200, "Hello world!")
})

r.Run(":29090")
}
```

See the [example.go file](https://github.com/zsais/go-gin-prometheus/blob/master/example/example.go)

0 comments on commit 2823ad1

Please sign in to comment.