diff options
Diffstat (limited to 'test/node/write_callback')
-rwxr-xr-x | test/node/write_callback/app.js | 13 |
1 files changed, 13 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..3a9e51e8 --- /dev/null +++ b/test/node/write_callback/app.js @@ -0,0 +1,13 @@ +#!/usr/bin/env node + +var fs = require('fs'); + +require('unit-http').createServer(function (req, res) { + res.writeHead(200, {'Content-Type': 'text/plain'}); + var a = 'world'; + res.write('hello', 'utf8', function() { + a = 'blah'; + fs.appendFile('callback', '', function() {}); + }); + res.end(a); +}).listen(7080); |