super-graph/serv/cmd_serv.go

30 lines
459 B
Go
Raw Normal View History

2019-09-26 06:35:31 +02:00
package serv
import (
"github.com/spf13/cobra"
)
func cmdServ(cmd *cobra.Command, args []string) {
var err error
if conf, err = initConf(); err != nil {
fatalInProd(err, "failed to read config")
}
if conf != nil {
db, err = initDBPool(conf)
if err == nil {
initCompiler()
initAllowList(confPath)
initPreparedList(confPath)
} else {
fatalInProd(err, "failed to connect to database")
}
2019-09-26 06:35:31 +02:00
}
initWatcher(confPath)
startHTTP()
}