forked from BitTigerInst/Github-Ranking-Crawler
-
Notifications
You must be signed in to change notification settings - Fork 2
/
wake_up_dyno.js
41 lines (37 loc) · 1.13 KB
/
wake_up_dyno.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
var http = require('http'); //importing http
var options_1 = {
host: 'warm-hamlet-26182.herokuapp.com',
port: 80,
path: '/crawl'
};
var options_2 = {
host: 'peaceful-wildwood-28897.herokuapp.com',
port: 80,
path: '/crawl'
};
console.log("======WAKUP DYNO START: BitTiger Geek Ranking Board");
http.get(options_1, function (res) {
res.on('data', function (chunk) {
try {
// optional logging... disable after it's working
console.log("======WAKUP DYNO: HEROKU RESPONSE: " + chunk);
} catch (err) {
console.log(err.message);
}
});
}).on('error', function (err) {
console.log("Error: " + err.message);
});
console.log("======WAKUP DYNO START: BitTiger Project Geek Ranking Board");
http.get(options_2, function (res) {
res.on('data', function (chunk) {
try {
// optional logging... disable after it's working
console.log("======WAKUP DYNO: HEROKU RESPONSE: " + chunk);
} catch (err) {
console.log(err.message);
}
});
}).on('error', function (err) {
console.log("Error: " + err.message);
});