增加跨域配置,以及增加配置说明

This commit is contained in:
2020-02-20 14:20:56 +08:00
parent 9070bd2fe7
commit 0f29b3304e
23 changed files with 255 additions and 144 deletions
+5 -4
View File
@@ -2,10 +2,9 @@ package main
import (
"code.hoteas.com/hoteas/hotime"
"code.hoteas.com/hoteas/hotime/dri/mysql"
"code.hoteas.com/hoteas/hotime/tools/db"
"fmt"
"strings"
//"go.hoteas.com/hotime/cache"
"golang.org/x/net/websocket"
"time"
@@ -32,8 +31,10 @@ func main() {
//ca.Cache("xyzo","dasdas")
//ca.Cache("xyz*",nil)
//fmt.Println(ca.Cache("xyzm").Data)
mysql.SetDB(&appIns)
//mysql
//mysql.SetDB(&appIns)
//自动选择数据库
db.SetDB(&appIns)
//appIns.SetConnectDB(func(err ...*hotime.Error) *sql.DB {
// query := appIns.Config.GetString("dbUser") + ":" + appIns.Config.GetString("dbPwd") +