31 lines
489 B
Go
31 lines
489 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"time"
|
|
"xiawan/wx/api"
|
|
"xiawan/wx/db"
|
|
"xiawan/wx/srv/srvconfig"
|
|
)
|
|
|
|
func main() {
|
|
expireDate := time.Date(2030, 8, 17, 0, 0, 0, 0, time.Local)
|
|
if time.Now().After(expireDate) {
|
|
fmt.Println("过期")
|
|
os.Exit(1)
|
|
}
|
|
|
|
srvconfig.ConfigSetUp()
|
|
version := srvconfig.GlobalSetting.Version
|
|
fmt.Println("Version: ", version)
|
|
|
|
db.InitDB()
|
|
go db.StartCleanupTask()
|
|
db.RedisSetup()
|
|
err := api.WXServerGinHttpApiStart()
|
|
if err != nil {
|
|
return
|
|
}
|
|
}
|