Ping
Middleware to add new URL path and send "pong" as response.
Usefull for checking the health of server.
Usage
Import
import "github.com/ngamux/middleware/ping"
Instance With Default Config
pingMiddleware := ping.New()
Instance With Custom Config
pingMiddleware := ping.New(ping.Config{
Path: "/check",
})
Mount to Ngamux
mux := ngamux.New()
mux.Use(pingMiddleware)