mirror of
https://gitee.com/johng/gf
synced 2026-07-04 21:03:13 +08:00
18 lines
283 B
Go
18 lines
283 B
Go
package main
|
|
|
|
import (
|
|
"github.com/gogf/gf/net/ghttp"
|
|
)
|
|
|
|
func main() {
|
|
s := ghttp.GetServer()
|
|
s.BindHandler("/log/error", func(r *ghttp.Request) {
|
|
if j := r.GetJson(); j != nil {
|
|
r.Response.Write(j.Get("test"))
|
|
}
|
|
})
|
|
s.SetErrorLogEnabled(true)
|
|
s.SetPort(8199)
|
|
s.Run()
|
|
}
|