| | |
| | | package main |
| | | |
| | | import ( |
| | | "basic.com/dbapi.git" |
| | | "basic.com/valib/logger.git" |
| | | "flag" |
| | | "github.com/spf13/viper" |
| | | "strconv" |
| | | "webserver/cache" |
| | | "webserver/extend/config" |
| | | "webserver/extend/sys" |
| | | "webserver/router" |
| | | |
| | | "basic.com/dbapi.git" |
| | | "basic.com/valib/logger.git" |
| | | "github.com/spf13/viper" |
| | | ) |
| | | |
| | | var envirment = flag.String("e", "dev", "") |
| | |
| | | go cache.Init(initchan, *dbIp, *surveyPort,*pubPort) |
| | | logger.Debug("heartBeat with db done!",<-initchan) |
| | | |
| | | // 统计系统运行状态 |
| | | go sys.GatherStat() |
| | | |
| | | r := router.NewRouter() |
| | | r.Run("0.0.0.0:8000") |
| | | } |