node.js - nodejs - multiple async http requests -


i have started journey nodejs , create simple nodejs app needs to: - first request/get initial data via http, - use received json set of requests (some can done in parallel, needs executed first , data received used create valid url).

taking account nodejs asynchronous , based on callbacks, wondering best way achieve in order have 'clean code' , not mess code much.

thanks hints / guidelines, mark

maybe check out async library. has lot of built in functionality seems accomplish you're looking for. couple of useful ones right off bat might "async.waterfall" , "async.map".

async.waterfall

async.map


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -