improve configuration feature for ghttp.Server

This commit is contained in:
John
2019-11-07 16:40:34 +08:00
parent 05120b585d
commit ad7375b44b
10 changed files with 99 additions and 60 deletions

View File

@ -1,11 +1,12 @@
package main
import (
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
)
func main() {
s := ghttp.GetServer()
s := g.Server()
s.BindHandler("/", func(r *ghttp.Request) {
r.Response.Writeln("您可以同时通过HTTP和HTTPS方式看到该内容")
})