This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Think that we got the list of products to import into database(May be from CSV or external API anything...) | |
const { products } = require("./products"); | |
async function execute() { | |
let importedProducts = []; | |
for await (const data of products) { | |
const product = await importProduct(data); | |
importedProducts.push(product); | |
} |