Files
gf/geg/net/ghttp/server/pprof.go

16 lines
232 B
Go
Raw Normal View History

2018-04-17 13:54:33 +08:00
package main
import (
2019-04-03 00:03:46 +08:00
"github.com/gogf/gf/g/net/ghttp"
2018-04-17 13:54:33 +08:00
)
func main() {
2019-04-03 00:03:46 +08:00
s := ghttp.GetServer()
s.EnablePprof()
s.BindHandler("/", func(r *ghttp.Request) {
r.Response.Writeln("哈喽世界!")
})
s.SetPort(8199)
s.Run()
2018-04-17 13:54:33 +08:00
}