Showing
1 changed file
with
6 additions
and
4 deletions
... | @@ -4,15 +4,17 @@ const line = require('@line/bot-sdk'); | ... | @@ -4,15 +4,17 @@ const line = require('@line/bot-sdk'); |
4 | var https=require('https'); | 4 | var https=require('https'); |
5 | const fs = require('fs'); | 5 | const fs = require('fs'); |
6 | 6 | ||
7 | -var key = fs.readFileSync(path.resolve(__dirname, '../cert/key.pem')); | 7 | +var key = fs.readFileSync(path.resolve('/etc/letsencrypt/live/oss.chatbot.bu.to/privkey.pem')); |
8 | -var cert = fs.readFileSync(path.resolve(__dirname, '../cert/cert.pem')); | 8 | +var cert = fs.readFileSync(path.resolve('/etc/letsencrypt/live/oss.chatbot.bu.to/cert.pem')); |
9 | -var ca = fs.readFileSync(path.resolve(__dirname, '../cert/cai.pem')); | 9 | +var ca = fs.readFileSync(path.resolve('/etc/letsencrypt/live/oss.chatbot.bu.to/fullchain.pem')); |
10 | 10 | ||
11 | https.createServer({ | 11 | https.createServer({ |
12 | key: key, | 12 | key: key, |
13 | cert: cert, | 13 | cert: cert, |
14 | ca: ca | 14 | ca: ca |
15 | -}, app).listen(port); | 15 | +}, app).listen(80,()=>{ |
16 | + console.log('server on'); | ||
17 | +}); | ||
16 | 18 | ||
17 | //papago api | 19 | //papago api |
18 | var request = require('request'); | 20 | var request = require('request'); | ... | ... |
-
Please register or login to post a comment