EC2 Default User

soccer script commit

...@@ -24,6 +24,7 @@ app.post('/hook', function (req, res) { ...@@ -24,6 +24,7 @@ app.post('/hook', function (req, res) {
24 console.log('[request]', req.body); 24 console.log('[request]', req.body);
25 console.log('[request source] ', eventObj.source); 25 console.log('[request source] ', eventObj.source);
26 console.log('[request message]', eventObj.message); 26 console.log('[request message]', eventObj.message);
27 + console.log("Receive Message : ", eventObj.message.text);
27 28
28 request.post( 29 request.post(
29 { 30 {
...@@ -45,7 +46,7 @@ app.post('/hook', function (req, res) { ...@@ -45,7 +46,7 @@ app.post('/hook', function (req, res) {
45 ] 46 ]
46 } 47 }
47 },(error, response, body) => { 48 },(error, response, body) => {
48 - console.log(body) 49 + console.log(body);
49 }); 50 });
50 51
51 52
...@@ -57,7 +58,7 @@ try { ...@@ -57,7 +58,7 @@ try {
57 ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'), 58 ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
58 key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(), 59 key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
59 cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(), 60 cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
60 - key : fs.readFileSync('./rootca.key'), 61 + //key : fs.readFileSync('./rootca.key'),
61 // cert : fs.readFileSync('./rootca.crt') 62 // cert : fs.readFileSync('./rootca.crt')
62 }; 63 };
63 64
......
1 +var request = require('request');
2 +
3 +var options = {
4 + method: 'GET',
5 + url: 'https://v3.football.api-sports.io/players',
6 + qs: {id: '276', season: '2019'},
7 + headers: {
8 + 'x-rapidapi-host': 'v3.football.api-sports.io',
9 + 'x-rapidapi-key': 'e8a0e218c8msh6742d80e6af318ep11271fjsn9b0927b5f4de'
10 + }
11 +};
12 +
13 +request(options, function (error, response) {
14 + if (error) throw new Error(error);
15 + console.log(response.body);
16 +});
...\ No newline at end of file ...\ No newline at end of file