summaryrefslogtreecommitdiffhomepage
path: root/test/node/write_callback/app.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtest/node/write_callback/app.js10
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);