0 Star 0 Fork 620

李明 / gf

forked from John / gf 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
https_http.go 434 Bytes
一键复制 编辑 原始数据 按行查看 历史
package main
import (
"gitee.com/johng/gf/g/net/ghttp"
)
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(8198, 8199)
s.SetPort(8200, 8300)
s.EnableAdmin()
s.Run()
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/limingsky/gf.git
git@gitee.com:limingsky/gf.git
limingsky
gf
gf
c9a36a8224f1

搜索帮助

344bd9b3 5694891 D2dac590 5694891