Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Changing Async/Await to Promises.all to Speed Up API Calls in Node.JS

const allPromises = [];
for (r in records) {
  const promise = update(r);
  allPromises.push(promise);
};
await Promise.all(allPromises);
Source by levelup.gitconnected.com #
 
PREVIOUS NEXT
Tagged: #Changing #Speed #Up #API #Calls
ADD COMMENT
Topic
Name
7+5 =