1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-23 16:43:41 +00:00

34 lines
678 B
Markdown
Raw Normal View History

2020-09-29 01:28:43 +02:00
# Monitor
Monitor middleware for [Fiber](https://github.com/gofiber/fiber) that reports server metrics. Inspired by [express-status-monitor](https://github.com/RafalWilinski/express-status-monitor)
![](https://i.imgur.com/4NfRCDm.gif)
### Table of Contents
- [Signatures](#signatures)
- [Examples](#examples)
### Signatures
```go
func New() fiber.Handler
```
### Examples
Import the middleware package that is part of the Fiber web framework
```go
2020-09-29 02:35:41 +02:00
package main
2020-09-29 01:28:43 +02:00
import (
2020-09-29 02:35:41 +02:00
"log"
2020-09-29 01:28:43 +02:00
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/monitor"
)
2020-09-29 02:35:41 +02:00
func main() {
app := fiber.New()
app.Get("/dashboard", monitor.New())
log.Fatal(app.Listen(":3000"))
}
```