Files
gf/geg/net/ghttp/server/https/https.go

15 lines
335 B
Go
Raw Normal View History

2018-04-23 19:22:59 +08:00
package main
import (
"gitee.com/johng/gf/g/net/ghttp"
)
func main() {
s := ghttp.GetServer()
s.BindHandler("/", func(r *ghttp.Request){
2018-04-23 22:03:11 +08:00
r.Response.Writeln("来自于HTTPS的哈喽世界")
2018-04-23 19:22:59 +08:00
})
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
s.SetPort(8199)
s.Run()
}