mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
ed45c77be5
Former-commit-id: ed635ee95de7160cde11eaabc0c1dcb0e460a620
22 lines
404 B
Go
22 lines
404 B
Go
package main
|
|
|
|
import (
|
|
"github.com/kataras/iris/v12"
|
|
|
|
"github.com/kataras/iris/v12/middleware/pprof"
|
|
)
|
|
|
|
func main() {
|
|
app := iris.New()
|
|
|
|
app.Get("/", func(ctx iris.Context) {
|
|
ctx.HTML("<h1> Please click <a href='/debug/pprof'>here</a>")
|
|
})
|
|
|
|
p := pprof.New()
|
|
app.Any("/debug/pprof", p)
|
|
app.Any("/debug/pprof/{action:path}", p)
|
|
// ___________
|
|
app.Listen(":8080")
|
|
}
|