summaryrefslogblamecommitdiffhomepage
path: root/test/node/write_callback/app.js
blob: 9d4bc1c5f5f83ae233c00a2d739d76a3af1389f7 (plain) (tree)
1
2
3
4
5
6
7
8
9
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);