32 lines
686 B
JavaScript
32 lines
686 B
JavaScript
const OS = require('../../server/models/tablas/OS');
|
|
|
|
async function fillOS() {
|
|
let count = 1;
|
|
let limit = 7;
|
|
let sistemas = [
|
|
"Windows 7",
|
|
"Windows 10",
|
|
"Debian",
|
|
"Fedora",
|
|
"CentOS",
|
|
"Ubuntu",
|
|
"MacOS"
|
|
];
|
|
|
|
console.log('\n\tFilling out «OS».'.cyan.italic.bold);
|
|
|
|
for (osname of sistemas) {
|
|
await OS.create({
|
|
osname
|
|
})
|
|
.then(() => {
|
|
console.log(`${ count }/${ limit }\trecords created.`);
|
|
count++;
|
|
})
|
|
.catch(() => {
|
|
throw new Error();
|
|
});
|
|
};
|
|
};
|
|
|
|
module.exports = fillOS; |