summaryrefslogblamecommitdiffhomepage
path: root/test/node/promise_end/app.js
blob: 75c2ef7ddaeee6562badea1017843d0db93bb5d1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14


                       
                                                  









                                                     
                

var fs = require('fs');

require('http').createServer(function (req, res) {
    res.write('blah');

    Promise.resolve().then(() => {
        res.end();
    });

    req.on('data', (data) => {
        fs.appendFile('callback', '', function() {});
    });

}).listen(8080);