dynopoker
dynopoker copied to clipboard
How to make this work with heroku-json-server ( Node.js) ?
Hi i'm a pure FE and still very green in the BE side. I was trying to user kaffeine but is not longer working. Then I've heard about this dynopoker, but I assume this is for ruby BE, right? Is there any possibility to port this to Nodejs?
Hello! dynopoker is ruby only lib with current state, but the idea is really simple: ping itself every 30mins. Since you mentioned Node all basically boils down to:
setInterval(function() { ping(); }, 30*60*1000);
Ping method may look like:
var http = require('http');
function ping() {
var options = { method: 'HEAD', host: 'github.com', port: 80, path: '/' };
http.request(options, function(_res) {}).end();
}