var http = require('http'); var server = http.createServer(function(req, res) { req.connection.setTimeout(0); res.sendHeader(200, {'Content-Type': 'text/plain'}); setInterval(function() { res.sendBody("Hello\n"); res.flush(); }, 10000); }); server.listen(8000);