Update 'server.js'
This commit is contained in:
parent
ee13e051bf
commit
f0a17ee9b0
15
server.js
15
server.js
|
@ -54,6 +54,21 @@ setInterval(function () {
|
|||
});
|
||||
}, 60000);
|
||||
|
||||
request.get({
|
||||
url: "http://localhost/api/auto-gen-feature",
|
||||
json: true,
|
||||
headers: {'User-Agent': 'request'}
|
||||
}, (err, res, data) => {
|
||||
if (err) {
|
||||
console.log('Error:', err);
|
||||
} else if (res.statusCode !== 200) {
|
||||
console.log('Status:', res.statusCode);
|
||||
} else {
|
||||
// data is already parsed as JSON:
|
||||
console.log(data);
|
||||
}
|
||||
});
|
||||
|
||||
setInterval(function () {
|
||||
request.get({
|
||||
url: "http://localhost/api/auto-gen-feature",
|
||||
|
|
Loading…
Reference in New Issue
Block a user