Download Files with TypeScript, Node.js & async.queue

preview_player
Показать описание
How to download thousands of files from the web using a queue.

Рекомендации по теме
Комментарии
Автор

I am not a Node developer (this is just from my experiment), I think to tell the queue that an image finished downloading you should call the callback() on "finish" event like this: response.pipe(file)
.on('finish', () => { callback(); }); otherwise you're still calling it before even knowing if the download has finished or not!

simomed
Автор

import queue from 'async/queue';


SyntaxError: Cannot use import statement outside a module

denial