修改初始数据脚本
This commit is contained in:
parent
c71040fb8a
commit
7a212e1535
10
init-data.js
10
init-data.js
@ -9,15 +9,19 @@ const platforms = require('./fixtures/platforms');
|
||||
|
||||
fixtures.clear(function(err) {
|
||||
if (!err) {
|
||||
console.log('正在加载初始数据')
|
||||
fixtures.load(__dirname + '/fixtures/platforms.js', function(err) {
|
||||
if (err) throw err;
|
||||
console.log('平台加载完成')
|
||||
});
|
||||
fixtures.load(__dirname + '/fixtures/roles.js', function(err) {
|
||||
if (err) throw err;
|
||||
console.log('角色加载完成')
|
||||
});
|
||||
fixtures.load(__dirname + '/fixtures/system_dics.js', function(err) {
|
||||
if (err) throw err;
|
||||
});
|
||||
// fixtures.load(__dirname + '/fixtures/system_dics.js', function(err) {
|
||||
// if (err) throw err;
|
||||
// console.log()
|
||||
// });
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"dev": "cross-env nodemon src/app.js --exec babel-node ",
|
||||
"pro": "cross-env NODE_ENV=production nodemon src/app.js --exec babel-node ",
|
||||
"init:roles": "node init-roles.js",
|
||||
"init": "node init-data.js",
|
||||
"clear": "node clear-data.js"
|
||||
},
|
||||
"keywords": [],
|
||||
|
Loading…
x
Reference in New Issue
Block a user