Answer the question
In order to leave comments, you need to log in
With async and without - is there a difference?
I take the simplest example
var http = require('http');
http.createServer(function (req, res) {
//тут 60 секунд идет работа в СИНХРОННОМ режиме
//fs.readFileSync
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(req.url);
res.end();
}).listen(8080);
var http = require('http');
http.createServer( async function (req, res) {
//тут 60 секунд идет работа в СИНХРОННОМ режиме
//fs.readFileSync
res.writeHead(200, {'Content-Type': 'text/html'});
res.write(req.url);
res.end();
}).listen(8080);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question