Files
gf/geg/net/ghttp/server/hello.go
2019-04-03 00:03:46 +08:00

18 lines
289 B
Go

package main
import (
"github.com/gogf/gf/g"
"github.com/gogf/gf/g/net/ghttp"
"github.com/gogf/gf/g/os/gproc"
)
func main() {
s := g.Server()
s.SetIndexFolder(true)
s.BindHandler("/", func(r *ghttp.Request) {
r.Response.Write("pid:", gproc.Pid())
})
s.SetPort(8199)
s.Run()
}