27 lines
403 B
Go
27 lines
403 B
Go
package boot
|
|
|
|
import (
|
|
"NaiveBotRouter/pkg/conf"
|
|
"NaiveBotRouter/pkg/log"
|
|
ws "NaiveBotRouter/pkg/websocket"
|
|
"flag"
|
|
)
|
|
|
|
var (
|
|
cfgFile string
|
|
debug bool
|
|
)
|
|
|
|
func init() {
|
|
flag.StringVar(&cfgFile, "config", "config.toml", "config file")
|
|
flag.BoolVar(&debug, "debug", false, "debug mode")
|
|
flag.Parse()
|
|
|
|
log.InitLog(debug)
|
|
}
|
|
|
|
func Bootstrap() {
|
|
conf.InitConfig(cfgFile)
|
|
ws.ServeBackendServer()
|
|
}
|