Reputation: 128
How do I async parallel multiple app.use calls? I've read https://github.com/caolan/async and I've seen:
async.parallel([
function(){ ... },
function(){ ... }
], callback);
But I'm not quite sure how to use it with the following:
app.use('/api/users', api.users);
app.use('/api/score', api.score);
app.use('/api/payment', api.payment);
app.use('/api/ci',api.ci);
app.use('/api/db', api.concepts);
app.use('/api/swing', api.swing);
app.use('/api/list', api.list);
Upvotes: 1
Views: 90
Reputation: 241
app.use('/api/users', api.users)
is not an asynchronous code. It just assign api.users
to handle request with paths matching /api/users
. You don't need to use async.parallel
for this.
Upvotes: 3