Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

105
Views
node js api design and waiting for long process excution

I have 2 tables

  1. pin codes - list of pin codes [lets take 5000]

  2. addresses - corresponding addresses-from an API

I want to write an API like '/update-addresses' by using Node Js

After updating the required table API should give response back like 'update done'

above scenario was working fine in my case when i am going with 10 pin codes.

but for 100 or more it's taking too much time to complete. is it will through an error like timed out?

how we can reduce the time for 100 or more pin codes?

algorithm:

fun(res,req){
a=list of pin codes 
output=[]
Promise.all(a.map(){
 let p=new Promise((resolve)=>{
   axios(API call).then(d=>{
     resolve(d)
   })
 })
 return p.then(out=>{
   output.push(out)
 })
}).then(()=>{
  res.send(output)
})

}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!