Files
gf/.example/net/ghttp/server/reload/https.go

18 lines
322 B
Go
Raw Normal View History

package main
import (
2019-07-29 21:01:19 +08:00
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/net/ghttp"
)
func main() {
2019-04-03 00:03:46 +08:00
s := g.Server()
s.BindHandler("/", func(r *ghttp.Request) {
r.Response.Writeln("哈罗!")
})
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
s.EnableAdmin()
s.SetPort(8200)
s.Run()
}