super-graph/serv/cmd_serv.go

29 lines
435 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
initWatcher(confPath)
if conf, err = initConf(); err != nil {
fatalInProd(err, "failed to read config")
}
db, err = initDBPool(conf)
if err != nil {
fatalInProd(err, "failed to connect to database")
2019-09-26 06:35:31 +02:00
}
initCompiler()
initResolvers()
initAllowList(confPath)
initPreparedList(confPath)
2019-09-26 06:35:31 +02:00
startHTTP()
}