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

15 lines
315 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){
r.Response.Writeln("哈喽世界!")
})
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
s.SetPort(8199)
s.Run()
}