Skip to content

Commit

Permalink
async_1-2
Browse files Browse the repository at this point in the history
  • Loading branch information
rastvorov committed Sep 30, 2016
1 parent 4a68ef6 commit c15405c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ http.createServer(function(req, res) {
var info;

if (req.url == '/') {
fs.readFile('index.html', function (err, info) { // callback

info = fs.readFileSync('index.html');
res.end(info);
res.end('');
});

}

}).listen(3000);
}).listen(3000);

0 comments on commit c15405c

Please sign in to comment.