Add the frame for installation.

This commit is contained in:
zicla
2018-12-03 21:21:37 +08:00
parent 821c625fb9
commit 5611c5acb6
24 changed files with 593 additions and 452 deletions

View File

@ -14,13 +14,16 @@ func main() {
rest.LOGGER.Init()
defer rest.LOGGER.Destroy()
//将运行时参数装填到config中去。
rest.PrepareConfigs()
//装载配置文件,这个决定了是否需要执行安装过程
rest.CONFIG.Init()
//全局运行的上下文
rest.CONTEXT.Init()
defer rest.CONTEXT.Destroy()
http.Handle("/", rest.CONTEXT.Router)
rest.LOGGER.Info("App started at http://localhost:%v", rest.CONFIG.ServerPort)