30 lines
449 B
Go
30 lines
449 B
Go
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")
|
|
}
|
|
|
|
initCrypto()
|
|
initCompiler()
|
|
initResolvers()
|
|
initAllowList(confPath)
|
|
initPreparedList(confPath)
|
|
|
|
startHTTP()
|
|
}
|