Skip to content

Instantly share code, notes, and snippets.

@youtalk
Created May 10, 2012 12:20
Show Gist options
  • Save youtalk/2652726 to your computer and use it in GitHub Desktop.
Save youtalk/2652726 to your computer and use it in GitHub Desktop.
Ping by Node.js to restart your Heroku hosting site
var request = require('request');
(function ping () {
request.get({ url: 'http://YourWebApp.herokuapp.com' }, function (err, res, body) {
if (!err && res.statusCode === 200) {
console.log('done');
}
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment