ghttp.Server热重启特性测试中

This commit is contained in:
John
2018-05-13 22:00:10 +08:00
parent d8bd344b66
commit 327c22379e
9 changed files with 80 additions and 26 deletions

View File

@ -6,11 +6,12 @@ import (
func main() {
s := ghttp.GetServer()
s.EnableAdmin()
s.BindHandler("/", func(r *ghttp.Request){
r.Response.Writeln("您可以同时通过HTTP和HTTPS方式看到该内容")
})
s.EnableHTTPS("/home/john/temp/server.crt", "/home/john/temp/server.key")
s.SetHTTPSPort(443)
s.SetPort(80)
s.SetHTTPSPort(8198)
s.SetPort(8199)
s.Run()
}