Files
censo2020Back/helpers/tables/OS.js
T
2020-09-10 03:06:23 -05:00

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;