은승우

app.ks

Showing 1 changed file with 2 additions and 6 deletions
1 var express = require('express'); 1 var express = require('express');
2 var app = express(); 2 var app = express();
3 const line = require('@line/bot-sdk'); 3 const line = require('@line/bot-sdk');
4 +var https=require('https');
4 5
5 -const https = require('https');
6 const fs = require('fs'); 6 const fs = require('fs');
7 const options = { 7 const options = {
8 ca: fs.readFileSync('/etc/letsencrypt/live/oss.chatbot.bu.to/fullchain.pem'), 8 ca: fs.readFileSync('/etc/letsencrypt/live/oss.chatbot.bu.to/fullchain.pem'),
...@@ -10,11 +10,7 @@ const options = { ...@@ -10,11 +10,7 @@ const options = {
10 cert: fs.readFileSync('/etc/letsencrypt/live/oss.chatbot.bu.to/cert.pem') 10 cert: fs.readFileSync('/etc/letsencrypt/live/oss.chatbot.bu.to/cert.pem')
11 }; 11 };
12 12
13 -https.createServer(options, (req, res) => { 13 +https.createServer(options, app).listen(443);
14 - res.writeHead(200);
15 - res.end('hello world\n');
16 -}).listen(8000);
17 -
18 14
19 //papago api 15 //papago api
20 var request = require('request'); 16 var request = require('request');
......