Paul Lecuq
36c5d6f2ed
- web service with json support - web page - cron service to update database infos
30 lines
506 B
Go
30 lines
506 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
|
|
"git.paulbsd.com/paulbsd/qrz/src/config"
|
|
"git.paulbsd.com/paulbsd/qrz/src/database"
|
|
"git.paulbsd.com/paulbsd/qrz/src/qrz"
|
|
"git.paulbsd.com/paulbsd/qrz/src/qrzws"
|
|
_ "github.com/go-sql-driver/mysql"
|
|
)
|
|
|
|
func main() {
|
|
var config config.Config
|
|
config.GetConfig()
|
|
|
|
err := database.Initialize(&config)
|
|
defer config.Db.Close()
|
|
|
|
err = qrz.InitCronConfig(config)
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
|
|
err = qrzws.RunServer(config)
|
|
if err != nil {
|
|
log.Fatalln(err)
|
|
}
|
|
}
|