Created
May 10, 2012 12:20
-
-
Save youtalk/2652726 to your computer and use it in GitHub Desktop.
Ping by Node.js to restart your Heroku hosting site
This file contains hidden or 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
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