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"
|
2020-05-09 19:09:27 +02:00
|
|
|
"git.paulbsd.com/paulbsd/qrz/src/database"
|
2020-01-29 12:25:06 +01:00
|
|
|
"git.paulbsd.com/paulbsd/qrz/src/qrz"
|
2020-05-09 19:09:27 +02:00
|
|
|
"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()
|
|
|
|
|
2020-05-09 19:09:27 +02:00
|
|
|
err := database.Initialize(&config)
|
|
|
|
defer config.Db.Close()
|
2019-09-07 11:58:52 +02:00
|
|
|
|
2020-05-09 19:09:27 +02:00
|
|
|
err = qrz.InitCronConfig(config)
|
2019-09-07 11:58:52 +02:00
|
|
|
if err != nil {
|
|
|
|
log.Fatalln(err)
|
|
|
|
}
|
|
|
|
|
2020-05-09 19:09:27 +02:00
|
|
|
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
|
|
|
}
|