title: node js api design and waiting for long process excution
body: <p>I have 2 tables</p>
  <ol>
  <li><p>pin codes - list of pin codes [lets take 5000]</p>
  </li>
  <li><p>addresses - corresponding addresses-from an API</p>
  </li>
  </ol>
  <p>I want to write an API like '/update-addresses' by using Node Js</p>
  <p>After updating the required table API should give response back like 'update done'</p>
  <p>above scenario was working fine in my case when i am going with 10 pin codes.</p>
  <p><strong>but for 100 or more it's taking too much time to complete. is it will through an error like timed out?</strong></p>
  <p><strong>how we can reduce the time for 100 or more pin codes?</strong></p>
  <p>algorithm:</p>
  <pre><code>fun(res,req){
  a=list of pin codes 
  output=[]
  Promise.all(a.map(){
   let p=new Promise((resolve)=&gt;{
     axios(API call).then(d=&gt;{
       resolve(d)
     })
   })
   return p.then(out=&gt;{
     output.push(out)
   })
  }).then(()=&gt;{
    res.send(output)
  })
  
  }
  </code></pre>