Files
nginx-unit/test/node/write_buffer/app.js
Valentin Bartenev 7fd9444728 Node.js: returning "this" from writeHead() to allow chaining.
In Node.js version 11.10.0 and later, the writeHead() function returns "this".
2019-08-06 16:24:11 +03:00

7 lines
212 B
JavaScript
Executable File

#!/usr/bin/env node
require('unit-http').createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'})
.end(new Buffer([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]));
}).listen(7080);