first commit
This commit is contained in:
30
main.go
Normal file
30
main.go
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user