完善https示例,README updates

This commit is contained in:
John
2018-04-23 22:03:11 +08:00
parent 3512344d35
commit de9e9284bb
5 changed files with 82 additions and 3 deletions

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("来自于HTTPS的哈喽世界")
})
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
s.SetPort(8199)
s.Run()
}