优化http路由规则

This commit is contained in:
duanhf2012
2019-12-13 17:52:59 +08:00
parent ac435cc156
commit 7c37cba487
5 changed files with 282 additions and 161 deletions

View File

@@ -4,7 +4,7 @@ import (
"github.com/duanhf2012/origin/cluster"
"github.com/duanhf2012/origin/originnode"
"github.com/duanhf2012/origin/sysservice"
"github.com/duanhf2012/origin/sysservice/originhttp"
)
func main() {
@@ -15,7 +15,7 @@ func main() {
}
nodeCfg, _ := cluster.ReadNodeConfig("./config/nodeconfig.json", cluster.GetNodeId())
httpserver := sysservice.NewHttpServerService(nodeCfg.HttpPort) // http服务
httpserver := originhttp.NewHttpServerService(nodeCfg.HttpPort) // http服务
for _, ca := range nodeCfg.CAFile {
httpserver.SetHttps(ca.CertFile, ca.KeyFile)
}