2017-08-17 02:37:00 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2021-05-21 20:52:03 +00:00
|
|
|
"../../hotime"
|
2021-10-21 14:52:40 +00:00
|
|
|
"../dri/ddsms"
|
2021-08-28 05:05:12 +00:00
|
|
|
"./app"
|
2017-09-05 03:09:13 +00:00
|
|
|
"fmt"
|
2018-04-08 16:02:13 +00:00
|
|
|
"time"
|
2017-08-17 02:37:00 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2021-09-15 20:33:10 +00:00
|
|
|
date, _ := time.Parse("2006-01-02 15:04", time.Now().Format("2006-01-02")+" 14:00")
|
|
|
|
fmt.Println(date, date.Unix())
|
2021-10-26 16:27:24 +00:00
|
|
|
//fmt.Println("0123456"[1:7])
|
2021-06-04 02:04:37 +00:00
|
|
|
appIns := hotime.Init("config/config.json")
|
2021-05-28 18:57:03 +00:00
|
|
|
//RESTfull接口适配
|
2017-09-05 03:09:13 +00:00
|
|
|
appIns.SetConnectListener(func(context *hotime.Context) bool {
|
2021-07-06 20:08:40 +00:00
|
|
|
|
2021-12-27 12:40:16 +00:00
|
|
|
return true
|
2017-09-05 03:09:13 +00:00
|
|
|
})
|
2017-08-17 02:37:00 +00:00
|
|
|
|
2021-06-03 18:57:56 +00:00
|
|
|
//makeCode := code.MakeCode{}
|
|
|
|
//fmt.Println(common.ObjToStr(makeCode.Db2JSON("admin","test",appIns.Db)))
|
2021-10-21 14:52:40 +00:00
|
|
|
if ddsms.DefaultDDY.ApiKey == "" {
|
|
|
|
ddsms.DefaultDDY.Init(appIns.Config.GetString("smsKey"))
|
|
|
|
}
|
2021-06-03 18:57:56 +00:00
|
|
|
|
2017-09-05 03:09:13 +00:00
|
|
|
appIns.Run(hotime.Router{
|
2021-12-27 12:40:16 +00:00
|
|
|
"app": app.Project,
|
2017-09-05 03:09:13 +00:00
|
|
|
})
|
2017-08-17 02:37:00 +00:00
|
|
|
}
|