diff options
Diffstat (limited to 'test/node/write_callback/app.js')
-rwxr-xr-x | test/node/write_callback/app.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/node/write_callback/app.js b/test/node/write_callback/app.js new file mode 100755 index 00000000..9d4bc1c5 --- /dev/null +++ b/test/node/write_callback/app.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node + +require('unit-http').createServer(function (req, res) { + res.writeHead(200, {'Content-Type': 'text/plain'}); + var a = 'blah'; + res.write('hello', 'utf8', function() { + a = 'world'; + }); + res.end(a); +}).listen(7080); |