forked from golang/hotime
32 lines
658 B
Go
32 lines
658 B
Go
package main
|
|
|
|
import (
|
|
"../../hotime"
|
|
"../dri/ddsms"
|
|
"./app"
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
date, _ := time.Parse("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 14:00")
|
|
fmt.Println(date, date.Unix())
|
|
//fmt.Println("0123456"[1:7])
|
|
appIns := hotime.Init("config/config.json")
|
|
//RESTfull接口适配
|
|
appIns.SetConnectListener(func(context *hotime.Context) bool {
|
|
|
|
return true
|
|
})
|
|
|
|
//makeCode := code.MakeCode{}
|
|
//fmt.Println(common.ObjToStr(makeCode.Db2JSON("admin","test",appIns.Db)))
|
|
if ddsms.DefaultDDY.ApiKey == "" {
|
|
ddsms.DefaultDDY.Init(appIns.Config.GetString("smsKey"))
|
|
}
|
|
|
|
appIns.Run(hotime.Router{
|
|
"app": app.Project,
|
|
})
|
|
}
|