title: Mongoose not saving all documents in loop
body: <p>So I have the following code in an Express app for the POST api:</p>
  
  <pre><code>var dashSchema = new mongoose.Schema({
    key: 'string',
    status: 'string',
    assignee: 'string',
    summary: 'string'
  });
  
  var dashData = mongoose.model('dashData', dashSchema);
  
  
  app.post('/api/data', function(req, res) {
    var issues = req.body.issues;
  
    for (var i=0;i&lt;issues.length;i++) {
      dashData.create({key: issues[i].key, status: issues[i].fields.status.name, assignee: issues[i].fields.assignee, summary: issues[i].fields.summary});
    }
  
    res.end();
    });
  </code></pre>
  
  <p>Whenever I post an array of 5 "issues" only the first two are being written to the MongoDB. I assume this is because that is all it can write in the time it takes to iterate through the loop, but I don't know how to make it write all of the data, and then return the response.</p>
  
  <p>Any ideas?</p>