qrz/cmd/qrz/qrz.go

31 lines
546 B
Go
Raw Normal View History

2019-09-07 11:58:52 +02:00
package main
import (
"log"
2020-05-12 23:42:56 +02:00
_ "git.paulbsd.com/paulbsd/qrz/packrd"
2020-01-29 12:25:06 +01:00
"git.paulbsd.com/paulbsd/qrz/src/config"
"git.paulbsd.com/paulbsd/qrz/src/database"
2020-01-29 12:25:06 +01:00
"git.paulbsd.com/paulbsd/qrz/src/qrz"
"git.paulbsd.com/paulbsd/qrz/src/qrzws"
2019-09-07 11:58:52 +02:00
_ "github.com/go-sql-driver/mysql"
)
func main() {
2020-01-29 12:25:06 +01:00
var config config.Config
2019-09-07 11:58:52 +02:00
config.GetConfig()
err := database.Initialize(&config)
defer config.Db.Close()
2019-09-07 11:58:52 +02:00
err = qrz.InitCronConfig(config)
2019-09-07 11:58:52 +02:00
if err != nil {
log.Fatalln(err)
}
err = qrzws.RunServer(config)
2020-02-29 17:37:01 +01:00
if err != nil {
log.Fatalln(err)
}
2019-09-07 11:58:52 +02:00
}