Skip to content

Instantly share code, notes, and snippets.

@alanhoff alanhoff/async.js
Created Jun 8, 2017

Embed
What would you like to do?
async function fazerAlgo() {
const resposta = await request('https://google.com.br')
await fs.writeFile('resposta.html', resposta)
const resposta2 = await request('https://facebook.com')
await fs.writeFile('resposta2.html', resposta2)
console.log('Todas as respostas foram salvas!')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.