I am a beginner to express.js and I am trying to understand the difference between res.send and res.write ?
One of the most important differences not indicated in any of the answers are "draining".
The res.write may return true or false. As of the documentation:
Returns true if the entire data was flushed successfully to the kernel buffer. Returns false if all or part of the data was queued in user memory. 'drain' will be emitted when the buffer is free again.
So, when doing res.write, the caller should hold off writing until the drain event emits if the res.write returned false.
All these are handled automatically in res.send. The trade off is the buffering you will have to do when using the latter.