Files
nginx-unit/test/node/write_before_write_head/app.js
Andrey Zelenkov d625691ff4 Tests: test_node_application_write_before_writeHead reworked.
Added res.end() call in application and response status check.
Also, renamed to test_node_application_write_before_write_head.
2018-12-25 16:35:35 +03:00

8 lines
188 B
JavaScript
Executable File

#!/usr/bin/env node
require('unit-http').createServer(function (req, res) {
res.write('blah');
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end();
}).listen(7080);