Commit c052200d by chenjinjing

no message

parent a38a9f7b
......@@ -6,6 +6,7 @@
"dependencies": {
"@alicloud/sms-sdk": "^1.1.6",
"@types/node": "^10.12.18",
"bson": "^6.1.0",
"compression": "^1.7.4",
"express": "^4.17.1",
"express-async-handler": "^1.1.4",
......@@ -15,7 +16,7 @@
"lru-cache": "^4.1.5",
"md5": "^2.2.1",
"moment": "^2.24.0",
"mongoose": "^5.4.0",
"mongoose": "^7.6.0",
"mysql": "^2.18.1",
"mysql2": "^3.6.0",
"node-xlsx": "^0.16.1",
......
......@@ -5,15 +5,21 @@
<path>127.0.0.1</path>
<port>27017</port>
<w>1</w>
<!-- <dataBase>baseDB</dataBase> -->
<dataBase>yfs</dataBase>
<dataBase>baseDB</dataBase>
<wtimeoutMS>30000</wtimeoutMS>
</mongodb>
<mysqldb>
<!-- 本地mysql配置 -->
<mysqlHost>192.168.0.105</mysqlHost>
<mysqlPort>3306</mysqlPort>
<mysqlUser>root</mysqlUser>
<mysqlPwd>123456</mysqlPwd>
<dataBase>yfs</dataBase>
<dataBase>yfs</dataBase>.
<!-- 服务器mysql配置 -->
<!-- <mysqlHost>127.0.0.1</mysqlHost>
<mysqlPort>3306</mysqlPort>
<mysqlUser>root</mysqlUser>
<mysqlPwd>Yfs123456_</mysqlPwd>
<dataBase>yfs</dataBase> -->
</mysqldb>
</config>
const Sequelize =require('sequelize');
const Sequelize = require('sequelize');
export const TablesConfig = [
{
......
......@@ -18,7 +18,6 @@ export async function initConfig() {
systemConfig.port = parseInt(port[0]);
systemConfig.sign = sign[0];
const MongoPath = mongodb[0].path[0];
const MongoPort = mongodb[0].port[0];
const MongoW = mongodb[0].w[0];
......
......@@ -12,7 +12,12 @@ export async function initMysqlDB() {
max:20, //最大连接对象的个数
min:5, //最小连接对象的个数
idle:1000 //最长等待时间,单位为毫秒
}
},
timezone: '+08:00', //东八时区
dialectOptions: {
dateStrings: true,
typeCast: true
},
});
}
......
......@@ -9,8 +9,8 @@ async function lanuch() {
/**初始化配置解析 */
await initConfig();
/**初始化数据库 */
await mongoDB.initDB();
await initModel();
// await mongoDB.initDB();
// await initModel();
/**初始化sql */
await mysqlDB.initMysqlDB();
await initMysqlModel();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment