Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
Promises
node v6.17.1
version:
1.0.0
endpoint
share
tweet
require("minimal-request-promise").get("http://www.google.com") .then(function(response) { return require("fs-promise").writeFile("google.html", response); }) .then(function() { console.log("wrote file"); }) .catch(function(err) { console.log(err); })
Created from: http://rossboucher.com/await/#/
Loading…
no comments
sign in
to comment