async module 使用
http.get()为异步方法,现在使用async模块同步返回:
routes.get("/XXX", function (req, res) {
var reData = {};
array = [{},{}...{}]
async.forEach(
array,
function (index, cb) {
var url = index.url + "?eid=" + eid
var urlName = index.urlName;
v