Wednesday 24 February 2016

Is it okay to loop in express.js given that loops are blocking?

For instance, how bad is it to loop over the req.body fields as a middleware, and to confirm that they are within the bounds of my scheme? As another example, how bad is it to do a lookup with mongo and loop over the cursor with the .each() method, applying a quick formatting operation to the response?

Submitted February 25, 2016 at 05:09AM by -proof

No comments:

Post a Comment