은승우

Update app.js

Showing 1 changed file with 3 additions and 19 deletions
...@@ -4,25 +4,9 @@ const line = require('@line/bot-sdk'); ...@@ -4,25 +4,9 @@ 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('/etc/letsencrypt/live/oss.chatbot.bu.to/privkey.pem'); 7 +app.listen(443,()=>{
8 -var cert = fs.readFileSync('/etc/letsencrypt/live/oss.chatbot.bu.to/cert.pem'); 8 + console.log("server on 443");
9 -var ca = fs.readFileSync('/etc/letsencrypt/live/oss.chatbot.bu.to/fullchain.pem'); 9 +})
10 -
11 -https.createServer({
12 -key: key,
13 -cert: cert,
14 -ca: ca
15 -}, app).listen(80,()=>{
16 - console.log('server on 80');
17 -});
18 -
19 -https.createServer({
20 - key: key,
21 - cert: cert,
22 - ca: ca
23 - }, app).listen(443,()=>{
24 - console.log('server on 443');
25 - });
26 10
27 //papago api 11 //papago api
28 var request = require('request'); 12 var request = require('request');
......