gf/.example/net/ghttp/server/pprof.go

16 lines
230 B
Go

package main
import (
"github.com/gogf/gf/net/ghttp"
)
func main() {
s := ghttp.GetServer()
s.EnablePProf()
s.BindHandler("/", func(r *ghttp.Request) {
r.Response.Writeln("哈喽世界!")
})
s.SetPort(8199)
s.Run()
}