EC2 Default User

soccer script commit

......@@ -24,6 +24,7 @@ app.post('/hook', function (req, res) {
console.log('[request]', req.body);
console.log('[request source] ', eventObj.source);
console.log('[request message]', eventObj.message);
console.log("Receive Message : ", eventObj.message.text);
request.post(
{
......@@ -45,7 +46,7 @@ app.post('/hook', function (req, res) {
]
}
},(error, response, body) => {
console.log(body)
console.log(body);
});
......@@ -57,7 +58,7 @@ try {
ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
key : fs.readFileSync('./rootca.key'),
//key : fs.readFileSync('./rootca.key'),
// cert : fs.readFileSync('./rootca.crt')
};
......
var request = require('request');
var options = {
method: 'GET',
url: 'https://v3.football.api-sports.io/players',
qs: {id: '276', season: '2019'},
headers: {
'x-rapidapi-host': 'v3.football.api-sports.io',
'x-rapidapi-key': 'e8a0e218c8msh6742d80e6af318ep11271fjsn9b0927b5f4de'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
\ No newline at end of file