Browse Source

增加对sqlite数据库的支持 默认模式为mysql数据库

main
QM303176530 5 years ago
parent
commit
66393b35f7
  1. 2
      server/config.yaml
  2. 2
      server/main.go

2
server/config.yaml

@ -39,7 +39,7 @@ system:
use-multipoint: false
env: 'public' # Change to "develop" to skip authentication for development mode
addr: 8888
db-type: sqlite
db-type: "mysql"
# captcha configuration
captcha:

2
server/main.go

@ -13,6 +13,8 @@ func main() {
initialize.Mysql()
case "sqlite":
initialize.Sqlite()
default:
initialize.Mysql()
}
initialize.DBTables()
// 程序结束前关闭数据库链接

Loading…
Cancel
Save