static.large.js
This file
Path
benchmarks/node/static.large.js
14 lines · 398 bytes · JavaScript
Last changed by
Merge branch 'master' of http://github.com/visionmedia/expressGuillermo Rauchbefore adoption8ef6a0b
History of this fileTake it
Merge branch 'master' of http://github.com/visionmedia/expressGuillermo Rauchbefore adoption8ef6a0b
lines 1–14why, one step back12var fs = require('fs'),3 http = require('http')45http.createServer(function(req, res) {6 res.writeHead(200, { 'Content-Type': 'text/plain', 'Transfer-Encoding': 'chunked' })7 fs.createReadStream('benchmarks/shared/huge.js')8 .addListener('data', function(data){9 res.write(data, 'binary')10 })11 .addListener('end', function(){12 res.end()13 })14}).listen(3000, 'localhost')