update,
This commit is contained in:
32
tsc1877/task1/project/admin/db_seed/seed_all.js
Normal file
32
tsc1877/task1/project/admin/db_seed/seed_all.js
Normal file
@@ -0,0 +1,32 @@
|
||||
function delay(time_ms) {
|
||||
return new Promise((res, rej) => {
|
||||
setTimeout(() => {
|
||||
res();
|
||||
}, time_ms);
|
||||
});
|
||||
}
|
||||
|
||||
(async () => {
|
||||
await require('./helloworld');
|
||||
await delay(100);
|
||||
|
||||
await require('./categories');
|
||||
await delay(100);
|
||||
|
||||
await require('./products');
|
||||
await delay(100);
|
||||
|
||||
await require('./products_cid_1');
|
||||
await require('./products_cid_2');
|
||||
await require('./products_cid_3');
|
||||
await require('./products_cid_4');
|
||||
await require('./products_cid_5');
|
||||
await require('./products_cid_6');
|
||||
|
||||
await require('./auth');
|
||||
|
||||
await require('./item');
|
||||
await require('./order');
|
||||
|
||||
console.log('done');
|
||||
})();
|
Reference in New Issue
Block a user