This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const request = require('request'); | |
let download = (url, dest) => { | |
const file = fs.createWriteStream(dest); | |
const sendReq = request.get(url); | |
sendReq.on('response', (response) => { | |
sendReq.pipe(file); | |
}); | |
file.on('finish', () => file.close()); | |
sendReq.on('error', (err) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
netsh advfirewall set allprofiles state off |