Showing
1 changed file
with
5 additions
and
0 deletions
1 | const express = require('express'); | 1 | const express = require('express'); |
2 | +const express = require('express'); | ||
2 | const fs = require('fs'); | 3 | const fs = require('fs'); |
3 | const path = require('path'); | 4 | const path = require('path'); |
4 | const HTTPS = require('https'); | 5 | const HTTPS = require('https'); |
... | @@ -6,6 +7,8 @@ const domain = "2020105107.osschatbot.cf" | ... | @@ -6,6 +7,8 @@ const domain = "2020105107.osschatbot.cf" |
6 | const sslport = 23023; | 7 | const sslport = 23023; |
7 | const app = express(); | 8 | const app = express(); |
8 | 9 | ||
10 | +const app = express(); | ||
11 | + | ||
9 | app.use(express.urlencoded({ extended: false })); | 12 | app.use(express.urlencoded({ extended: false })); |
10 | app.use(express.json()); | 13 | app.use(express.json()); |
11 | 14 | ||
... | @@ -143,6 +146,7 @@ app.post('/message', (req, res) => { | ... | @@ -143,6 +146,7 @@ app.post('/message', (req, res) => { |
143 | res.json(data); | 146 | res.json(data); |
144 | }); | 147 | }); |
145 | 148 | ||
149 | + | ||
146 | try { | 150 | try { |
147 | const option = { | 151 | const option = { |
148 | ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'), | 152 | ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'), |
... | @@ -157,3 +161,4 @@ try { | ... | @@ -157,3 +161,4 @@ try { |
157 | console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.'); | 161 | console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.'); |
158 | console.log(error); | 162 | console.log(error); |
159 | } | 163 | } |
164 | + | ... | ... |
-
Please register or login to post a comment