Sha256: 3846747ba40f76d07eb15b38ec415fe90f2fc58f7521a75702defaa35a078c56
Contents?: true
Size: 568 Bytes
Versions: 74
Compression:
Stored size: 568 Bytes
Contents
var http = require('http'); var ecstatic = require('ecstatic')(__dirname); var server = http.createServer(function (req, res) { if (req.url === '/doom') { res.setHeader('content-type', 'multipart/octet-stream'); res.write('d'); var i = 0; var iv = setInterval(function () { res.write('o'); if (i++ >= 10) { clearInterval(iv); res.end('m'); } }, 500); } else ecstatic(req, res); }); console.log('Listening on :8082'); server.listen(8082);
Version data entries
74 entries across 72 versions & 5 rubygems