2022-07-11 11:07:17 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
. "code.hoteas.com/golang/hotime"
|
2026-01-22 04:36:52 +08:00
|
|
|
. "code.hoteas.com/golang/hotime/common"
|
2022-07-11 11:07:17 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
|
|
appIns := Init("config/config.json")
|
2022-08-01 03:40:09 +08:00
|
|
|
appIns.SetConnectListener(func(that *Context) (isFinished bool) {
|
|
|
|
|
|
|
|
|
|
return isFinished
|
|
|
|
|
})
|
2022-08-02 03:02:57 +08:00
|
|
|
|
2026-01-22 04:36:52 +08:00
|
|
|
appIns.Run(Router{
|
|
|
|
|
"app": {
|
|
|
|
|
"test": {
|
|
|
|
|
"hello": func(that *Context) {
|
|
|
|
|
that.Display(0, Map{"message": "Hello World"})
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|
2022-07-11 11:07:17 +08:00
|
|
|
}
|