mirror of
https://gitee.com/johng/gf
synced 2026-06-27 09:47:19 +08:00
ghttp.Server热重启特性测试中
This commit is contained in:
@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user