Skip to content

Instantly share code, notes, and snippets.

@sandrinodimattia
Last active December 10, 2015 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sandrinodimattia/4392905 to your computer and use it in GitHub Desktop.
Save sandrinodimattia/4392905 to your computer and use it in GitHub Desktop.
function warmup() {
warmUpSite("http://tempsdm.azurewebsites.net/");
warmUpSite("http://sandrino.azurewebsites.net/");
warmUpSite("http://myapp.cloudapp.net/");
}
function warmUpSite(url) {
console.info("warming up: " + url);
var req = require('request');
req.get({ url: url }, function(error, response, body) {
if (!error) {
console.info("hot hot hot! " + url);
} else {
console.error('error warming up ' + url + ': ' + error);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment