summaryrefslogtreecommitdiffhomepage
path: root/test/node/promise_end/app.js
blob: ed22464c8f0ea4bc0d8f671ffe5130311cbf45bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env node

var fs = require('fs');

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

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

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

}).listen(7080);