完成HTTPS支持

This commit is contained in:
John
2018-04-23 19:22:59 +08:00
parent b3f96c587e
commit da2bb36308
4 changed files with 34 additions and 11 deletions

15
geg/net/ghttp/https.go Normal file
View File

@ -0,0 +1,15 @@
package main
import (
"gitee.com/johng/gf/g/net/ghttp"
)
func main() {
s := ghttp.GetServer()
s.BindHandler("/", func(r *ghttp.Request){
r.Response.Writeln("哈喽世界!")
})
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
s.SetPort(8199)
s.Run()
}