1 Star 0 Fork 42

Alex_Lin/api-front

forked from hidu/api-front 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 833 Bytes
一键复制 编辑 原始数据 按行查看 历史
hidu 提交于 2015-11-29 19:24 . rename as api-front
package main
import (
"flag"
"fmt"
"github.com/hidu/api-front/proxy"
"log"
)
var confPath = flag.String("conf", "./conf/server.json", "server conf path")
var confDemo = flag.Bool("conf_demo", false, "show the demo conf")
func init() {
log.SetFlags(log.Lshortfile | log.LstdFlags | log.Ldate)
ua := flag.Usage
flag.Usage = func() {
ua()
fmt.Println("\n site: https://github.com/hidu/api-front")
fmt.Println(" version:", proxy.APIProxyVersion)
}
}
func main() {
flag.Parse()
if *confDemo {
showConfDemo()
return
}
manager := proxy.NewAPIServerManager(*confPath)
manager.Start()
}
func showConfDemo() {
conf := `
{
"server":[
{"port":8080,"enable":true,"name":"server on 8080 ","note":"8080 note"},
{"port":8081,"enable":true,"name":"server on 8081 ","note":"8081 note"}
]
}
`
fmt.Println(conf)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ilex/api-front.git
[email protected]:ilex/api-front.git
ilex
api-front
api-front
master

搜索帮助