title: Async Callback from Express
body: <p>So what I need is a way to let node calculate this huge thing I want it to calculate and immediately return 202 Accepted, and the status of the calculation is aksed via the Poller. Any ideas?</p>
  
  <p>I have already such scenario in my Node/Express Endpoints:</p>
  
  <pre><code>module.export.poller = (req,res) -&gt;
    res.status(200).send({
      percentFinished: precentFinished
    })
  
  module.export.beginHugeCalculation = (req,res) -&gt;
    async.waterfall [
      (next) -&gt;
      # very, very, very, very time-intensive calculation here
      next null
    ], (err) -&gt;
      # Success
      return
  
    # Immediately return HTTP 202 after Async Waterfall is triggered!
    # Status can be requested via Poller Route
  
    res.status(202).send({
      inProgress  : true
    })
    return
  </code></pre>
  
  <p><strong>This works as expected with unit tests in the backend</strong>, the async is triggered, then a 202 is returned and via the Poller API I can ask about the progress (which is calculated somewhere else). Point is, as soon as I do this from the frontEnd in manual testing, the <code>beginHugeCaluclation</code> is triggered and returns 202, and the poller requests I am sending each second are queued and return all at once only when async is finished, giving back 100% in every request. </p>