Ubuntu

0624_1

1 -// 모듈을 읽어 들입니다.
2 -const request = require('request');//request라는 모듈로 http를 노드에서 통신할 수 있게
3 -// 요청을 위한 상수를 선언합니다: TOKEN은 자신의 것을 입력해주세요.
4 -const TARGET_URL = 'https://notify-api.line.me/api/notify';//notify api의 주소
5 -const TOKEN = 'JSroU3MtclQ9bOZEL93Sn10X0NOcOQH0YenlJ7E6UHE';
6 -// 요청합니다.
7 -request.post(
8 - {
9 - url: TARGET_URL,
10 - headers: {
11 - 'Authorization': `Bearer ${TOKEN}`
12 - },
13 - form: {
14 - message: '안녕하세요. LINE Notify 테스트입니다.',
15 - stickerPackageId: 1,
16 - stickerId: 1
17 - }
18 - },(error, response, body) => {
19 - console.log(body)
20 - });
1 -{
2 - "name": "notify",
3 - "version": "1.0.0",
4 - "lockfileVersion": 1,
5 - "requires": true,
6 - "dependencies": {
7 - "ajv": {
8 - "version": "6.12.2",
9 - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
10 - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
11 - "requires": {
12 - "fast-deep-equal": "^3.1.1",
13 - "fast-json-stable-stringify": "^2.0.0",
14 - "json-schema-traverse": "^0.4.1",
15 - "uri-js": "^4.2.2"
16 - }
17 - },
18 - "asn1": {
19 - "version": "0.2.4",
20 - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
21 - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
22 - "requires": {
23 - "safer-buffer": "~2.1.0"
24 - }
25 - },
26 - "assert-plus": {
27 - "version": "1.0.0",
28 - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
29 - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
30 - },
31 - "asynckit": {
32 - "version": "0.4.0",
33 - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
34 - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
35 - },
36 - "aws-sign2": {
37 - "version": "0.7.0",
38 - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
39 - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
40 - },
41 - "aws4": {
42 - "version": "1.9.1",
43 - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
44 - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="
45 - },
46 - "bcrypt-pbkdf": {
47 - "version": "1.0.2",
48 - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
49 - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
50 - "requires": {
51 - "tweetnacl": "^0.14.3"
52 - }
53 - },
54 - "caseless": {
55 - "version": "0.12.0",
56 - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
57 - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
58 - },
59 - "combined-stream": {
60 - "version": "1.0.8",
61 - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
62 - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
63 - "requires": {
64 - "delayed-stream": "~1.0.0"
65 - }
66 - },
67 - "core-util-is": {
68 - "version": "1.0.2",
69 - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
70 - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
71 - },
72 - "dashdash": {
73 - "version": "1.14.1",
74 - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
75 - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
76 - "requires": {
77 - "assert-plus": "^1.0.0"
78 - }
79 - },
80 - "delayed-stream": {
81 - "version": "1.0.0",
82 - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
83 - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
84 - },
85 - "ecc-jsbn": {
86 - "version": "0.1.2",
87 - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
88 - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
89 - "requires": {
90 - "jsbn": "~0.1.0",
91 - "safer-buffer": "^2.1.0"
92 - }
93 - },
94 - "extend": {
95 - "version": "3.0.2",
96 - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
97 - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
98 - },
99 - "extsprintf": {
100 - "version": "1.3.0",
101 - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
102 - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
103 - },
104 - "fast-deep-equal": {
105 - "version": "3.1.1",
106 - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
107 - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA=="
108 - },
109 - "fast-json-stable-stringify": {
110 - "version": "2.1.0",
111 - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
112 - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
113 - },
114 - "forever-agent": {
115 - "version": "0.6.1",
116 - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
117 - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
118 - },
119 - "form-data": {
120 - "version": "2.3.3",
121 - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
122 - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
123 - "requires": {
124 - "asynckit": "^0.4.0",
125 - "combined-stream": "^1.0.6",
126 - "mime-types": "^2.1.12"
127 - }
128 - },
129 - "getpass": {
130 - "version": "0.1.7",
131 - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
132 - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
133 - "requires": {
134 - "assert-plus": "^1.0.0"
135 - }
136 - },
137 - "har-schema": {
138 - "version": "2.0.0",
139 - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
140 - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
141 - },
142 - "har-validator": {
143 - "version": "5.1.3",
144 - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
145 - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
146 - "requires": {
147 - "ajv": "^6.5.5",
148 - "har-schema": "^2.0.0"
149 - }
150 - },
151 - "http-signature": {
152 - "version": "1.2.0",
153 - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
154 - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
155 - "requires": {
156 - "assert-plus": "^1.0.0",
157 - "jsprim": "^1.2.2",
158 - "sshpk": "^1.7.0"
159 - }
160 - },
161 - "is-typedarray": {
162 - "version": "1.0.0",
163 - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
164 - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
165 - },
166 - "isstream": {
167 - "version": "0.1.2",
168 - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
169 - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
170 - },
171 - "jsbn": {
172 - "version": "0.1.1",
173 - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
174 - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
175 - },
176 - "json-schema": {
177 - "version": "0.2.3",
178 - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
179 - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
180 - },
181 - "json-schema-traverse": {
182 - "version": "0.4.1",
183 - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
184 - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
185 - },
186 - "json-stringify-safe": {
187 - "version": "5.0.1",
188 - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
189 - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
190 - },
191 - "jsprim": {
192 - "version": "1.4.1",
193 - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
194 - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
195 - "requires": {
196 - "assert-plus": "1.0.0",
197 - "extsprintf": "1.3.0",
198 - "json-schema": "0.2.3",
199 - "verror": "1.10.0"
200 - }
201 - },
202 - "mime-db": {
203 - "version": "1.44.0",
204 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
205 - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
206 - },
207 - "mime-types": {
208 - "version": "2.1.27",
209 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
210 - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
211 - "requires": {
212 - "mime-db": "1.44.0"
213 - }
214 - },
215 - "oauth-sign": {
216 - "version": "0.9.0",
217 - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
218 - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
219 - },
220 - "performance-now": {
221 - "version": "2.1.0",
222 - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
223 - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
224 - },
225 - "psl": {
226 - "version": "1.8.0",
227 - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
228 - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
229 - },
230 - "punycode": {
231 - "version": "2.1.1",
232 - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
233 - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
234 - },
235 - "qs": {
236 - "version": "6.5.2",
237 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
238 - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
239 - },
240 - "request": {
241 - "version": "2.88.2",
242 - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
243 - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
244 - "requires": {
245 - "aws-sign2": "~0.7.0",
246 - "aws4": "^1.8.0",
247 - "caseless": "~0.12.0",
248 - "combined-stream": "~1.0.6",
249 - "extend": "~3.0.2",
250 - "forever-agent": "~0.6.1",
251 - "form-data": "~2.3.2",
252 - "har-validator": "~5.1.3",
253 - "http-signature": "~1.2.0",
254 - "is-typedarray": "~1.0.0",
255 - "isstream": "~0.1.2",
256 - "json-stringify-safe": "~5.0.1",
257 - "mime-types": "~2.1.19",
258 - "oauth-sign": "~0.9.0",
259 - "performance-now": "^2.1.0",
260 - "qs": "~6.5.2",
261 - "safe-buffer": "^5.1.2",
262 - "tough-cookie": "~2.5.0",
263 - "tunnel-agent": "^0.6.0",
264 - "uuid": "^3.3.2"
265 - }
266 - },
267 - "safe-buffer": {
268 - "version": "5.2.1",
269 - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
270 - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
271 - },
272 - "safer-buffer": {
273 - "version": "2.1.2",
274 - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
275 - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
276 - },
277 - "sshpk": {
278 - "version": "1.16.1",
279 - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
280 - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
281 - "requires": {
282 - "asn1": "~0.2.3",
283 - "assert-plus": "^1.0.0",
284 - "bcrypt-pbkdf": "^1.0.0",
285 - "dashdash": "^1.12.0",
286 - "ecc-jsbn": "~0.1.1",
287 - "getpass": "^0.1.1",
288 - "jsbn": "~0.1.0",
289 - "safer-buffer": "^2.0.2",
290 - "tweetnacl": "~0.14.0"
291 - }
292 - },
293 - "tough-cookie": {
294 - "version": "2.5.0",
295 - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
296 - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
297 - "requires": {
298 - "psl": "^1.1.28",
299 - "punycode": "^2.1.1"
300 - }
301 - },
302 - "tunnel-agent": {
303 - "version": "0.6.0",
304 - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
305 - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
306 - "requires": {
307 - "safe-buffer": "^5.0.1"
308 - }
309 - },
310 - "tweetnacl": {
311 - "version": "0.14.5",
312 - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
313 - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
314 - },
315 - "uri-js": {
316 - "version": "4.2.2",
317 - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
318 - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
319 - "requires": {
320 - "punycode": "^2.1.0"
321 - }
322 - },
323 - "uuid": {
324 - "version": "3.4.0",
325 - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
326 - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
327 - },
328 - "verror": {
329 - "version": "1.10.0",
330 - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
331 - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
332 - "requires": {
333 - "assert-plus": "^1.0.0",
334 - "core-util-is": "1.0.2",
335 - "extsprintf": "^1.2.0"
336 - }
337 - }
338 - }
339 -}
1 -{
2 - "name": "notify",
3 - "version": "1.0.0",
4 - "description": "",
5 - "main": "app.js",
6 - "scripts": {
7 - "test": "echo \"Error: no test specified\" && exit 1"
8 - },
9 - "author": "",
10 - "license": "ISC",
11 - "dependencies": {
12 - "request": "^2.88.2"
13 - }
14 -}
1 -const request = require('request');
2 -const TARGET_URL = 'https://api.line.me/v2/bot/message/push'
3 -const MULTI_TARGET_URL = 'https://api.line.me/v2/bot/message/multicast'
4 -const BROAD_TARGET_URL = 'https://api.line.me/v2/bot/message/broadcast'
5 -const TOKEN = 'RbPAXRYWub0evg2yyi7oiHytZsZsE0JtbZgRYZNZDU1vjpJkOwGqwh+aKTYKVhVHh6LZOUVZLl84NQQlNWNbXR9hUhPEiLEK0cie4O3OlKUuEe/3wAsjPu7HbRi1zn9BsR3Qr4pcqmiIKP8HRUKvEwdB04t89/1O/w1cDnyilFU='
6 -const USER_ID = 'U484f0bb741ba39b93dcba8dbb731860d'
7 -
8 -// Single User
9 -// request.post(
10 -// {
11 -// url: TARGET_URL,
12 -// headers: {
13 -// 'Authorization': `Bearer ${TOKEN}`
14 -// },
15 -// json: {
16 -// "to": `${USER_ID}`,
17 -// "messages":[
18 -// {
19 -// "type":"text",
20 -// "text":"Hello, user"
21 -// },
22 -// {
23 -// "type":"text",
24 -// "text":"May I help you?"
25 -// }
26 -// ]
27 -// }
28 -// },(error, response, body) => {
29 -// console.log(body)
30 -// });
31 -
32 -
33 -// Multicast User
34 -// request.post(
35 -// {
36 -// url: MULTI_TARGET_URL,
37 -// headers: {
38 -// 'Authorization': `Bearer ${TOKEN}`
39 -// },
40 -// json: {
41 -// "to": [`${USER_ID}`],
42 -// "messages":[
43 -// {
44 -// "type":"text",
45 -// "text":"Hello, user"
46 -// },
47 -// {
48 -// "type":"text",
49 -// "text":"May I help you?"
50 -// }
51 -// ]
52 -// }
53 -// },(error, response, body) => {
54 -// console.log(body)
55 -// });
56 -
57 -
58 -// Broadcast
59 - request.post(
60 - {
61 - url: BROAD_TARGET_URL,
62 - headers: {
63 - 'Authorization': `Bearer ${TOKEN}`
64 - },
65 - json: {
66 - "messages":[
67 - {
68 - "type":"text",
69 - "text":"Hello, user"
70 - },
71 - {
72 - "type":"text",
73 - "text":"May I help you?"
74 - }
75 - ]
76 - }
77 - },(error, response, body) => {
78 - console.log(body)
79 - });
80 -
...\ No newline at end of file ...\ No newline at end of file
1 -{
2 - "name": "push",
3 - "version": "1.0.0",
4 - "lockfileVersion": 1,
5 - "requires": true,
6 - "dependencies": {
7 - "ajv": {
8 - "version": "6.12.2",
9 - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
10 - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
11 - "requires": {
12 - "fast-deep-equal": "^3.1.1",
13 - "fast-json-stable-stringify": "^2.0.0",
14 - "json-schema-traverse": "^0.4.1",
15 - "uri-js": "^4.2.2"
16 - }
17 - },
18 - "asn1": {
19 - "version": "0.2.4",
20 - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
21 - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
22 - "requires": {
23 - "safer-buffer": "~2.1.0"
24 - }
25 - },
26 - "assert-plus": {
27 - "version": "1.0.0",
28 - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
29 - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
30 - },
31 - "asynckit": {
32 - "version": "0.4.0",
33 - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
34 - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
35 - },
36 - "aws-sign2": {
37 - "version": "0.7.0",
38 - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
39 - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
40 - },
41 - "aws4": {
42 - "version": "1.9.1",
43 - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
44 - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="
45 - },
46 - "bcrypt-pbkdf": {
47 - "version": "1.0.2",
48 - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
49 - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
50 - "requires": {
51 - "tweetnacl": "^0.14.3"
52 - }
53 - },
54 - "caseless": {
55 - "version": "0.12.0",
56 - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
57 - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
58 - },
59 - "combined-stream": {
60 - "version": "1.0.8",
61 - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
62 - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
63 - "requires": {
64 - "delayed-stream": "~1.0.0"
65 - }
66 - },
67 - "core-util-is": {
68 - "version": "1.0.2",
69 - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
70 - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
71 - },
72 - "dashdash": {
73 - "version": "1.14.1",
74 - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
75 - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
76 - "requires": {
77 - "assert-plus": "^1.0.0"
78 - }
79 - },
80 - "delayed-stream": {
81 - "version": "1.0.0",
82 - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
83 - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
84 - },
85 - "ecc-jsbn": {
86 - "version": "0.1.2",
87 - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
88 - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
89 - "requires": {
90 - "jsbn": "~0.1.0",
91 - "safer-buffer": "^2.1.0"
92 - }
93 - },
94 - "extend": {
95 - "version": "3.0.2",
96 - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
97 - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
98 - },
99 - "extsprintf": {
100 - "version": "1.3.0",
101 - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
102 - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
103 - },
104 - "fast-deep-equal": {
105 - "version": "3.1.1",
106 - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
107 - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA=="
108 - },
109 - "fast-json-stable-stringify": {
110 - "version": "2.1.0",
111 - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
112 - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
113 - },
114 - "forever-agent": {
115 - "version": "0.6.1",
116 - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
117 - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
118 - },
119 - "form-data": {
120 - "version": "2.3.3",
121 - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
122 - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
123 - "requires": {
124 - "asynckit": "^0.4.0",
125 - "combined-stream": "^1.0.6",
126 - "mime-types": "^2.1.12"
127 - }
128 - },
129 - "getpass": {
130 - "version": "0.1.7",
131 - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
132 - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
133 - "requires": {
134 - "assert-plus": "^1.0.0"
135 - }
136 - },
137 - "har-schema": {
138 - "version": "2.0.0",
139 - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
140 - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
141 - },
142 - "har-validator": {
143 - "version": "5.1.3",
144 - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
145 - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
146 - "requires": {
147 - "ajv": "^6.5.5",
148 - "har-schema": "^2.0.0"
149 - }
150 - },
151 - "http-signature": {
152 - "version": "1.2.0",
153 - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
154 - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
155 - "requires": {
156 - "assert-plus": "^1.0.0",
157 - "jsprim": "^1.2.2",
158 - "sshpk": "^1.7.0"
159 - }
160 - },
161 - "is-typedarray": {
162 - "version": "1.0.0",
163 - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
164 - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
165 - },
166 - "isstream": {
167 - "version": "0.1.2",
168 - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
169 - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
170 - },
171 - "jsbn": {
172 - "version": "0.1.1",
173 - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
174 - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
175 - },
176 - "json-schema": {
177 - "version": "0.2.3",
178 - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
179 - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
180 - },
181 - "json-schema-traverse": {
182 - "version": "0.4.1",
183 - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
184 - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
185 - },
186 - "json-stringify-safe": {
187 - "version": "5.0.1",
188 - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
189 - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
190 - },
191 - "jsprim": {
192 - "version": "1.4.1",
193 - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
194 - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
195 - "requires": {
196 - "assert-plus": "1.0.0",
197 - "extsprintf": "1.3.0",
198 - "json-schema": "0.2.3",
199 - "verror": "1.10.0"
200 - }
201 - },
202 - "lodash": {
203 - "version": "4.17.15",
204 - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
205 - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
206 - },
207 - "mime-db": {
208 - "version": "1.44.0",
209 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
210 - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
211 - },
212 - "mime-types": {
213 - "version": "2.1.27",
214 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
215 - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
216 - "requires": {
217 - "mime-db": "1.44.0"
218 - }
219 - },
220 - "oauth-sign": {
221 - "version": "0.9.0",
222 - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
223 - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
224 - },
225 - "performance-now": {
226 - "version": "2.1.0",
227 - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
228 - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
229 - },
230 - "psl": {
231 - "version": "1.8.0",
232 - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
233 - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
234 - },
235 - "punycode": {
236 - "version": "2.1.1",
237 - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
238 - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
239 - },
240 - "qs": {
241 - "version": "6.5.2",
242 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
243 - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
244 - },
245 - "request": {
246 - "version": "2.88.2",
247 - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
248 - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
249 - "requires": {
250 - "aws-sign2": "~0.7.0",
251 - "aws4": "^1.8.0",
252 - "caseless": "~0.12.0",
253 - "combined-stream": "~1.0.6",
254 - "extend": "~3.0.2",
255 - "forever-agent": "~0.6.1",
256 - "form-data": "~2.3.2",
257 - "har-validator": "~5.1.3",
258 - "http-signature": "~1.2.0",
259 - "is-typedarray": "~1.0.0",
260 - "isstream": "~0.1.2",
261 - "json-stringify-safe": "~5.0.1",
262 - "mime-types": "~2.1.19",
263 - "oauth-sign": "~0.9.0",
264 - "performance-now": "^2.1.0",
265 - "qs": "~6.5.2",
266 - "safe-buffer": "^5.1.2",
267 - "tough-cookie": "~2.5.0",
268 - "tunnel-agent": "^0.6.0",
269 - "uuid": "^3.3.2"
270 - }
271 - },
272 - "request-promise-core": {
273 - "version": "1.1.3",
274 - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz",
275 - "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==",
276 - "requires": {
277 - "lodash": "^4.17.15"
278 - }
279 - },
280 - "request-promise-native": {
281 - "version": "1.0.8",
282 - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz",
283 - "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==",
284 - "requires": {
285 - "request-promise-core": "1.1.3",
286 - "stealthy-require": "^1.1.1",
287 - "tough-cookie": "^2.3.3"
288 - }
289 - },
290 - "rquest": {
291 - "version": "0.1.0",
292 - "resolved": "https://registry.npmjs.org/rquest/-/rquest-0.1.0.tgz",
293 - "integrity": "sha512-gIG0JFuiAKvcKLl1H93JO/pliB/eUHTRRoJ+AyGEcEh8ub68WsV7gc87HVUX6q+6bU8ErYdDESS6NHeSMba5LQ==",
294 - "requires": {
295 - "request": "^2.85.0",
296 - "request-promise-native": "^1.0.5",
297 - "seventh": "^0.7.3"
298 - }
299 - },
300 - "safe-buffer": {
301 - "version": "5.2.1",
302 - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
303 - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
304 - },
305 - "safer-buffer": {
306 - "version": "2.1.2",
307 - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
308 - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
309 - },
310 - "setimmediate": {
311 - "version": "1.0.5",
312 - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
313 - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU="
314 - },
315 - "seventh": {
316 - "version": "0.7.35",
317 - "resolved": "https://registry.npmjs.org/seventh/-/seventh-0.7.35.tgz",
318 - "integrity": "sha512-8uGsybZk/XBSv7BvyjbSeK+R8vpWh2jkZJq0UIMVlJTr9CZsCLTfGWKtcBxmHzMUbzSPxa134prhvZA8GuIx/w==",
319 - "requires": {
320 - "setimmediate": "^1.0.5"
321 - }
322 - },
323 - "sshpk": {
324 - "version": "1.16.1",
325 - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
326 - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
327 - "requires": {
328 - "asn1": "~0.2.3",
329 - "assert-plus": "^1.0.0",
330 - "bcrypt-pbkdf": "^1.0.0",
331 - "dashdash": "^1.12.0",
332 - "ecc-jsbn": "~0.1.1",
333 - "getpass": "^0.1.1",
334 - "jsbn": "~0.1.0",
335 - "safer-buffer": "^2.0.2",
336 - "tweetnacl": "~0.14.0"
337 - }
338 - },
339 - "stealthy-require": {
340 - "version": "1.1.1",
341 - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
342 - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks="
343 - },
344 - "tough-cookie": {
345 - "version": "2.5.0",
346 - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
347 - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
348 - "requires": {
349 - "psl": "^1.1.28",
350 - "punycode": "^2.1.1"
351 - }
352 - },
353 - "tunnel-agent": {
354 - "version": "0.6.0",
355 - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
356 - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
357 - "requires": {
358 - "safe-buffer": "^5.0.1"
359 - }
360 - },
361 - "tweetnacl": {
362 - "version": "0.14.5",
363 - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
364 - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
365 - },
366 - "uri-js": {
367 - "version": "4.2.2",
368 - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
369 - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
370 - "requires": {
371 - "punycode": "^2.1.0"
372 - }
373 - },
374 - "uuid": {
375 - "version": "3.4.0",
376 - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
377 - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
378 - },
379 - "verror": {
380 - "version": "1.10.0",
381 - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
382 - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
383 - "requires": {
384 - "assert-plus": "^1.0.0",
385 - "core-util-is": "1.0.2",
386 - "extsprintf": "^1.2.0"
387 - }
388 - }
389 - }
390 -}
1 -{
2 - "name": "push",
3 - "version": "1.0.0",
4 - "description": "",
5 - "main": "app.js",
6 - "scripts": {
7 - "test": "echo \"Error: no test specified\" && exit 1"
8 - },
9 - "author": "",
10 - "license": "ISC",
11 - "dependencies": {
12 - "request": "^2.88.2",
13 - "rquest": "^0.1.0"
14 - }
15 -}
1 -var express = require('express');
2 -const request = require('request');
3 -const TARGET_URL = 'https://api.line.me/v2/bot/message/reply'
4 -const TOKEN = 'RbPAXRYWub0evg2yyi7oiHytZsZsE0JtbZgRYZNZDU1vjpJkOwGqwh+aKTYKVhVHh6LZOUVZLl84NQQlNWNbXR9hUhPEiLEK0cie4O3OlKUuEe/3wAsjPu7HbRi1zn9BsR3Qr4pcqmiIKP8HRUKvEwdB04t89/1O/w1cDnyilFU='
5 -const fs = require('fs');
6 -const path = require('path');
7 -const HTTPS = require('https');
8 -const domain = "www.osschat.tk"
9 -const sslport = 23023;
10 -
11 -const bodyParser = require('body-parser');
12 -var app = express();
13 -app.use(bodyParser.json());
14 -app.post('/hook', function (req, res) {//hootk으로 사용자가 보낸 메세지가 들어옴
15 -
16 - var eventObj = req.body.events[0];
17 - var source = eventObj.source;
18 - var message = eventObj.message;
19 -
20 - // request log //
21 - console.log('======================', new Date() ,'======================');
22 - console.log('[request]', req.body);
23 - console.log('[request source] ', eventObj.source);
24 - console.log('[request message]', eventObj.message);//message라는 객체로 사용자의 메세지 확인가능
25 -
26 -
27 - request.post(//답변을 보냄-위의 reply라는 api쪽으로
28 - {
29 - url: TARGET_URL,
30 - headers: {
31 - 'Authorization': `Bearer ${TOKEN}`
32 - },
33 - json: {
34 - "replyToken":eventObj.replyToken,
35 - "messages":[
36 - {
37 - "type":"text",
38 - "text":"Hello, user"
39 - },
40 - {
41 - "type":"text",
42 - "text":"May I help you?"
43 - }
44 - ]
45 - }
46 - },(error, response, body) => {
47 - console.log(body)
48 - });
49 -
50 -
51 - res.sendStatus(200);
52 -});
53 -
54 -try {
55 - const option = {
56 - ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
57 - key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
58 - cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
59 - };
60 -
61 - HTTPS.createServer(option, app).listen(sslport, () => {
62 - console.log(`[HTTPS] Server is started on port ${sslport}`);
63 - });
64 - } catch (error) {
65 - console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
66 - console.log(error);
67 - }
68 -
1 -{
2 - "name": "reply",
3 - "version": "1.0.0",
4 - "lockfileVersion": 1,
5 - "requires": true,
6 - "dependencies": {
7 - "accepts": {
8 - "version": "1.3.7",
9 - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
10 - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
11 - "requires": {
12 - "mime-types": "~2.1.24",
13 - "negotiator": "0.6.2"
14 - }
15 - },
16 - "ajv": {
17 - "version": "6.12.2",
18 - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
19 - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
20 - "requires": {
21 - "fast-deep-equal": "^3.1.1",
22 - "fast-json-stable-stringify": "^2.0.0",
23 - "json-schema-traverse": "^0.4.1",
24 - "uri-js": "^4.2.2"
25 - }
26 - },
27 - "array-flatten": {
28 - "version": "1.1.1",
29 - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
30 - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
31 - },
32 - "asn1": {
33 - "version": "0.2.4",
34 - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
35 - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
36 - "requires": {
37 - "safer-buffer": "~2.1.0"
38 - }
39 - },
40 - "assert-plus": {
41 - "version": "1.0.0",
42 - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
43 - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
44 - },
45 - "asynckit": {
46 - "version": "0.4.0",
47 - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
48 - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
49 - },
50 - "aws-sign2": {
51 - "version": "0.7.0",
52 - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
53 - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
54 - },
55 - "aws4": {
56 - "version": "1.9.1",
57 - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
58 - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="
59 - },
60 - "bcrypt-pbkdf": {
61 - "version": "1.0.2",
62 - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
63 - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
64 - "requires": {
65 - "tweetnacl": "^0.14.3"
66 - }
67 - },
68 - "body-parser": {
69 - "version": "1.19.0",
70 - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
71 - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
72 - "requires": {
73 - "bytes": "3.1.0",
74 - "content-type": "~1.0.4",
75 - "debug": "2.6.9",
76 - "depd": "~1.1.2",
77 - "http-errors": "1.7.2",
78 - "iconv-lite": "0.4.24",
79 - "on-finished": "~2.3.0",
80 - "qs": "6.7.0",
81 - "raw-body": "2.4.0",
82 - "type-is": "~1.6.17"
83 - }
84 - },
85 - "bytes": {
86 - "version": "3.1.0",
87 - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
88 - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
89 - },
90 - "caseless": {
91 - "version": "0.12.0",
92 - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
93 - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
94 - },
95 - "combined-stream": {
96 - "version": "1.0.8",
97 - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
98 - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
99 - "requires": {
100 - "delayed-stream": "~1.0.0"
101 - }
102 - },
103 - "content-disposition": {
104 - "version": "0.5.3",
105 - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
106 - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
107 - "requires": {
108 - "safe-buffer": "5.1.2"
109 - }
110 - },
111 - "content-type": {
112 - "version": "1.0.4",
113 - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
114 - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
115 - },
116 - "cookie": {
117 - "version": "0.4.0",
118 - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
119 - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
120 - },
121 - "cookie-signature": {
122 - "version": "1.0.6",
123 - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
124 - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
125 - },
126 - "core-util-is": {
127 - "version": "1.0.2",
128 - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
129 - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
130 - },
131 - "dashdash": {
132 - "version": "1.14.1",
133 - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
134 - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
135 - "requires": {
136 - "assert-plus": "^1.0.0"
137 - }
138 - },
139 - "debug": {
140 - "version": "2.6.9",
141 - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
142 - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
143 - "requires": {
144 - "ms": "2.0.0"
145 - }
146 - },
147 - "delayed-stream": {
148 - "version": "1.0.0",
149 - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
150 - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
151 - },
152 - "depd": {
153 - "version": "1.1.2",
154 - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
155 - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
156 - },
157 - "destroy": {
158 - "version": "1.0.4",
159 - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
160 - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
161 - },
162 - "ecc-jsbn": {
163 - "version": "0.1.2",
164 - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
165 - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
166 - "requires": {
167 - "jsbn": "~0.1.0",
168 - "safer-buffer": "^2.1.0"
169 - }
170 - },
171 - "ee-first": {
172 - "version": "1.1.1",
173 - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
174 - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
175 - },
176 - "encodeurl": {
177 - "version": "1.0.2",
178 - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
179 - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
180 - },
181 - "escape-html": {
182 - "version": "1.0.3",
183 - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
184 - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
185 - },
186 - "etag": {
187 - "version": "1.8.1",
188 - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
189 - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
190 - },
191 - "express": {
192 - "version": "4.17.1",
193 - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
194 - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
195 - "requires": {
196 - "accepts": "~1.3.7",
197 - "array-flatten": "1.1.1",
198 - "body-parser": "1.19.0",
199 - "content-disposition": "0.5.3",
200 - "content-type": "~1.0.4",
201 - "cookie": "0.4.0",
202 - "cookie-signature": "1.0.6",
203 - "debug": "2.6.9",
204 - "depd": "~1.1.2",
205 - "encodeurl": "~1.0.2",
206 - "escape-html": "~1.0.3",
207 - "etag": "~1.8.1",
208 - "finalhandler": "~1.1.2",
209 - "fresh": "0.5.2",
210 - "merge-descriptors": "1.0.1",
211 - "methods": "~1.1.2",
212 - "on-finished": "~2.3.0",
213 - "parseurl": "~1.3.3",
214 - "path-to-regexp": "0.1.7",
215 - "proxy-addr": "~2.0.5",
216 - "qs": "6.7.0",
217 - "range-parser": "~1.2.1",
218 - "safe-buffer": "5.1.2",
219 - "send": "0.17.1",
220 - "serve-static": "1.14.1",
221 - "setprototypeof": "1.1.1",
222 - "statuses": "~1.5.0",
223 - "type-is": "~1.6.18",
224 - "utils-merge": "1.0.1",
225 - "vary": "~1.1.2"
226 - }
227 - },
228 - "extend": {
229 - "version": "3.0.2",
230 - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
231 - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
232 - },
233 - "extsprintf": {
234 - "version": "1.3.0",
235 - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
236 - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
237 - },
238 - "fast-deep-equal": {
239 - "version": "3.1.1",
240 - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
241 - "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA=="
242 - },
243 - "fast-json-stable-stringify": {
244 - "version": "2.1.0",
245 - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
246 - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
247 - },
248 - "finalhandler": {
249 - "version": "1.1.2",
250 - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
251 - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
252 - "requires": {
253 - "debug": "2.6.9",
254 - "encodeurl": "~1.0.2",
255 - "escape-html": "~1.0.3",
256 - "on-finished": "~2.3.0",
257 - "parseurl": "~1.3.3",
258 - "statuses": "~1.5.0",
259 - "unpipe": "~1.0.0"
260 - }
261 - },
262 - "forever-agent": {
263 - "version": "0.6.1",
264 - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
265 - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
266 - },
267 - "form-data": {
268 - "version": "2.3.3",
269 - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
270 - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
271 - "requires": {
272 - "asynckit": "^0.4.0",
273 - "combined-stream": "^1.0.6",
274 - "mime-types": "^2.1.12"
275 - }
276 - },
277 - "forwarded": {
278 - "version": "0.1.2",
279 - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
280 - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
281 - },
282 - "fresh": {
283 - "version": "0.5.2",
284 - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
285 - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
286 - },
287 - "getpass": {
288 - "version": "0.1.7",
289 - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
290 - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
291 - "requires": {
292 - "assert-plus": "^1.0.0"
293 - }
294 - },
295 - "har-schema": {
296 - "version": "2.0.0",
297 - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
298 - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
299 - },
300 - "har-validator": {
301 - "version": "5.1.3",
302 - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
303 - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
304 - "requires": {
305 - "ajv": "^6.5.5",
306 - "har-schema": "^2.0.0"
307 - }
308 - },
309 - "http-errors": {
310 - "version": "1.7.2",
311 - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
312 - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
313 - "requires": {
314 - "depd": "~1.1.2",
315 - "inherits": "2.0.3",
316 - "setprototypeof": "1.1.1",
317 - "statuses": ">= 1.5.0 < 2",
318 - "toidentifier": "1.0.0"
319 - }
320 - },
321 - "http-signature": {
322 - "version": "1.2.0",
323 - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
324 - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
325 - "requires": {
326 - "assert-plus": "^1.0.0",
327 - "jsprim": "^1.2.2",
328 - "sshpk": "^1.7.0"
329 - }
330 - },
331 - "iconv-lite": {
332 - "version": "0.4.24",
333 - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
334 - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
335 - "requires": {
336 - "safer-buffer": ">= 2.1.2 < 3"
337 - }
338 - },
339 - "inherits": {
340 - "version": "2.0.3",
341 - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
342 - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
343 - },
344 - "ipaddr.js": {
345 - "version": "1.9.1",
346 - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
347 - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
348 - },
349 - "is-typedarray": {
350 - "version": "1.0.0",
351 - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
352 - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
353 - },
354 - "isstream": {
355 - "version": "0.1.2",
356 - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
357 - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
358 - },
359 - "jsbn": {
360 - "version": "0.1.1",
361 - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
362 - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
363 - },
364 - "json-schema": {
365 - "version": "0.2.3",
366 - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
367 - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
368 - },
369 - "json-schema-traverse": {
370 - "version": "0.4.1",
371 - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
372 - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
373 - },
374 - "json-stringify-safe": {
375 - "version": "5.0.1",
376 - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
377 - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
378 - },
379 - "jsprim": {
380 - "version": "1.4.1",
381 - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
382 - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
383 - "requires": {
384 - "assert-plus": "1.0.0",
385 - "extsprintf": "1.3.0",
386 - "json-schema": "0.2.3",
387 - "verror": "1.10.0"
388 - }
389 - },
390 - "media-typer": {
391 - "version": "0.3.0",
392 - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
393 - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
394 - },
395 - "merge-descriptors": {
396 - "version": "1.0.1",
397 - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
398 - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
399 - },
400 - "methods": {
401 - "version": "1.1.2",
402 - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
403 - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
404 - },
405 - "mime": {
406 - "version": "1.6.0",
407 - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
408 - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
409 - },
410 - "mime-db": {
411 - "version": "1.44.0",
412 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
413 - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
414 - },
415 - "mime-types": {
416 - "version": "2.1.27",
417 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
418 - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
419 - "requires": {
420 - "mime-db": "1.44.0"
421 - }
422 - },
423 - "ms": {
424 - "version": "2.0.0",
425 - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
426 - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
427 - },
428 - "negotiator": {
429 - "version": "0.6.2",
430 - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
431 - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
432 - },
433 - "oauth-sign": {
434 - "version": "0.9.0",
435 - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
436 - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
437 - },
438 - "on-finished": {
439 - "version": "2.3.0",
440 - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
441 - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
442 - "requires": {
443 - "ee-first": "1.1.1"
444 - }
445 - },
446 - "parseurl": {
447 - "version": "1.3.3",
448 - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
449 - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
450 - },
451 - "path-to-regexp": {
452 - "version": "0.1.7",
453 - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
454 - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
455 - },
456 - "performance-now": {
457 - "version": "2.1.0",
458 - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
459 - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
460 - },
461 - "proxy-addr": {
462 - "version": "2.0.6",
463 - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
464 - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==",
465 - "requires": {
466 - "forwarded": "~0.1.2",
467 - "ipaddr.js": "1.9.1"
468 - }
469 - },
470 - "psl": {
471 - "version": "1.8.0",
472 - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
473 - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
474 - },
475 - "punycode": {
476 - "version": "2.1.1",
477 - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
478 - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
479 - },
480 - "qs": {
481 - "version": "6.7.0",
482 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
483 - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
484 - },
485 - "range-parser": {
486 - "version": "1.2.1",
487 - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
488 - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
489 - },
490 - "raw-body": {
491 - "version": "2.4.0",
492 - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
493 - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
494 - "requires": {
495 - "bytes": "3.1.0",
496 - "http-errors": "1.7.2",
497 - "iconv-lite": "0.4.24",
498 - "unpipe": "1.0.0"
499 - }
500 - },
501 - "request": {
502 - "version": "2.88.2",
503 - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
504 - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
505 - "requires": {
506 - "aws-sign2": "~0.7.0",
507 - "aws4": "^1.8.0",
508 - "caseless": "~0.12.0",
509 - "combined-stream": "~1.0.6",
510 - "extend": "~3.0.2",
511 - "forever-agent": "~0.6.1",
512 - "form-data": "~2.3.2",
513 - "har-validator": "~5.1.3",
514 - "http-signature": "~1.2.0",
515 - "is-typedarray": "~1.0.0",
516 - "isstream": "~0.1.2",
517 - "json-stringify-safe": "~5.0.1",
518 - "mime-types": "~2.1.19",
519 - "oauth-sign": "~0.9.0",
520 - "performance-now": "^2.1.0",
521 - "qs": "~6.5.2",
522 - "safe-buffer": "^5.1.2",
523 - "tough-cookie": "~2.5.0",
524 - "tunnel-agent": "^0.6.0",
525 - "uuid": "^3.3.2"
526 - },
527 - "dependencies": {
528 - "qs": {
529 - "version": "6.5.2",
530 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
531 - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
532 - }
533 - }
534 - },
535 - "safe-buffer": {
536 - "version": "5.1.2",
537 - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
538 - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
539 - },
540 - "safer-buffer": {
541 - "version": "2.1.2",
542 - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
543 - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
544 - },
545 - "send": {
546 - "version": "0.17.1",
547 - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
548 - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
549 - "requires": {
550 - "debug": "2.6.9",
551 - "depd": "~1.1.2",
552 - "destroy": "~1.0.4",
553 - "encodeurl": "~1.0.2",
554 - "escape-html": "~1.0.3",
555 - "etag": "~1.8.1",
556 - "fresh": "0.5.2",
557 - "http-errors": "~1.7.2",
558 - "mime": "1.6.0",
559 - "ms": "2.1.1",
560 - "on-finished": "~2.3.0",
561 - "range-parser": "~1.2.1",
562 - "statuses": "~1.5.0"
563 - },
564 - "dependencies": {
565 - "ms": {
566 - "version": "2.1.1",
567 - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
568 - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
569 - }
570 - }
571 - },
572 - "serve-static": {
573 - "version": "1.14.1",
574 - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
575 - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
576 - "requires": {
577 - "encodeurl": "~1.0.2",
578 - "escape-html": "~1.0.3",
579 - "parseurl": "~1.3.3",
580 - "send": "0.17.1"
581 - }
582 - },
583 - "setprototypeof": {
584 - "version": "1.1.1",
585 - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
586 - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
587 - },
588 - "sshpk": {
589 - "version": "1.16.1",
590 - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
591 - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
592 - "requires": {
593 - "asn1": "~0.2.3",
594 - "assert-plus": "^1.0.0",
595 - "bcrypt-pbkdf": "^1.0.0",
596 - "dashdash": "^1.12.0",
597 - "ecc-jsbn": "~0.1.1",
598 - "getpass": "^0.1.1",
599 - "jsbn": "~0.1.0",
600 - "safer-buffer": "^2.0.2",
601 - "tweetnacl": "~0.14.0"
602 - }
603 - },
604 - "statuses": {
605 - "version": "1.5.0",
606 - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
607 - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
608 - },
609 - "toidentifier": {
610 - "version": "1.0.0",
611 - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
612 - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
613 - },
614 - "tough-cookie": {
615 - "version": "2.5.0",
616 - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
617 - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
618 - "requires": {
619 - "psl": "^1.1.28",
620 - "punycode": "^2.1.1"
621 - }
622 - },
623 - "tunnel-agent": {
624 - "version": "0.6.0",
625 - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
626 - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
627 - "requires": {
628 - "safe-buffer": "^5.0.1"
629 - }
630 - },
631 - "tweetnacl": {
632 - "version": "0.14.5",
633 - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
634 - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
635 - },
636 - "type-is": {
637 - "version": "1.6.18",
638 - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
639 - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
640 - "requires": {
641 - "media-typer": "0.3.0",
642 - "mime-types": "~2.1.24"
643 - }
644 - },
645 - "unpipe": {
646 - "version": "1.0.0",
647 - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
648 - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
649 - },
650 - "uri-js": {
651 - "version": "4.2.2",
652 - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
653 - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
654 - "requires": {
655 - "punycode": "^2.1.0"
656 - }
657 - },
658 - "utils-merge": {
659 - "version": "1.0.1",
660 - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
661 - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
662 - },
663 - "uuid": {
664 - "version": "3.4.0",
665 - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
666 - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
667 - },
668 - "vary": {
669 - "version": "1.1.2",
670 - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
671 - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
672 - },
673 - "verror": {
674 - "version": "1.10.0",
675 - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
676 - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
677 - "requires": {
678 - "assert-plus": "^1.0.0",
679 - "core-util-is": "1.0.2",
680 - "extsprintf": "^1.2.0"
681 - }
682 - }
683 - }
684 -}
1 -{
2 - "name": "reply",
3 - "version": "1.0.0",
4 - "description": "",
5 - "main": "app.js",
6 - "scripts": {
7 - "test": "echo \"Error: no test specified\" && exit 1"
8 - },
9 - "author": "",
10 - "license": "ISC",
11 - "dependencies": {
12 - "body-parser": "^1.19.0",
13 - "express": "^4.17.1",
14 - "request": "^2.88.2"
15 - }
16 -}
1 -const express = require('express');
2 -const fs = require('fs');
3 -const path = require('path');
4 -const HTTPS = require('https');
5 -
6 -const app = express();
7 -const domain = "www.osschat.tk"
8 -const sslport = 23023;
9 -
10 -
11 -try {
12 - const option = {
13 - ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
14 - key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
15 - cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
16 - };
17 -
18 - HTTPS.createServer(option, app).listen(sslport, () => {
19 - console.log(`[HTTPS] Server is started on port ${sslport}`);
20 - });
21 -} catch (error) {
22 - console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
23 - console.log(error);
24 -}
25 -
1 -{
2 - "name": "ssl",
3 - "version": "1.0.0",
4 - "lockfileVersion": 1,
5 - "requires": true,
6 - "dependencies": {
7 - "accepts": {
8 - "version": "1.3.7",
9 - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
10 - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
11 - "requires": {
12 - "mime-types": "~2.1.24",
13 - "negotiator": "0.6.2"
14 - }
15 - },
16 - "array-flatten": {
17 - "version": "1.1.1",
18 - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
19 - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
20 - },
21 - "body-parser": {
22 - "version": "1.19.0",
23 - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
24 - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
25 - "requires": {
26 - "bytes": "3.1.0",
27 - "content-type": "~1.0.4",
28 - "debug": "2.6.9",
29 - "depd": "~1.1.2",
30 - "http-errors": "1.7.2",
31 - "iconv-lite": "0.4.24",
32 - "on-finished": "~2.3.0",
33 - "qs": "6.7.0",
34 - "raw-body": "2.4.0",
35 - "type-is": "~1.6.17"
36 - }
37 - },
38 - "bytes": {
39 - "version": "3.1.0",
40 - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
41 - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
42 - },
43 - "content-disposition": {
44 - "version": "0.5.3",
45 - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
46 - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
47 - "requires": {
48 - "safe-buffer": "5.1.2"
49 - }
50 - },
51 - "content-type": {
52 - "version": "1.0.4",
53 - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
54 - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
55 - },
56 - "cookie": {
57 - "version": "0.4.0",
58 - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
59 - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
60 - },
61 - "cookie-signature": {
62 - "version": "1.0.6",
63 - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
64 - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
65 - },
66 - "debug": {
67 - "version": "2.6.9",
68 - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
69 - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
70 - "requires": {
71 - "ms": "2.0.0"
72 - }
73 - },
74 - "depd": {
75 - "version": "1.1.2",
76 - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
77 - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
78 - },
79 - "destroy": {
80 - "version": "1.0.4",
81 - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
82 - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
83 - },
84 - "ee-first": {
85 - "version": "1.1.1",
86 - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
87 - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
88 - },
89 - "encodeurl": {
90 - "version": "1.0.2",
91 - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
92 - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
93 - },
94 - "escape-html": {
95 - "version": "1.0.3",
96 - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
97 - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
98 - },
99 - "etag": {
100 - "version": "1.8.1",
101 - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
102 - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
103 - },
104 - "express": {
105 - "version": "4.17.1",
106 - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
107 - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
108 - "requires": {
109 - "accepts": "~1.3.7",
110 - "array-flatten": "1.1.1",
111 - "body-parser": "1.19.0",
112 - "content-disposition": "0.5.3",
113 - "content-type": "~1.0.4",
114 - "cookie": "0.4.0",
115 - "cookie-signature": "1.0.6",
116 - "debug": "2.6.9",
117 - "depd": "~1.1.2",
118 - "encodeurl": "~1.0.2",
119 - "escape-html": "~1.0.3",
120 - "etag": "~1.8.1",
121 - "finalhandler": "~1.1.2",
122 - "fresh": "0.5.2",
123 - "merge-descriptors": "1.0.1",
124 - "methods": "~1.1.2",
125 - "on-finished": "~2.3.0",
126 - "parseurl": "~1.3.3",
127 - "path-to-regexp": "0.1.7",
128 - "proxy-addr": "~2.0.5",
129 - "qs": "6.7.0",
130 - "range-parser": "~1.2.1",
131 - "safe-buffer": "5.1.2",
132 - "send": "0.17.1",
133 - "serve-static": "1.14.1",
134 - "setprototypeof": "1.1.1",
135 - "statuses": "~1.5.0",
136 - "type-is": "~1.6.18",
137 - "utils-merge": "1.0.1",
138 - "vary": "~1.1.2"
139 - }
140 - },
141 - "finalhandler": {
142 - "version": "1.1.2",
143 - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
144 - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
145 - "requires": {
146 - "debug": "2.6.9",
147 - "encodeurl": "~1.0.2",
148 - "escape-html": "~1.0.3",
149 - "on-finished": "~2.3.0",
150 - "parseurl": "~1.3.3",
151 - "statuses": "~1.5.0",
152 - "unpipe": "~1.0.0"
153 - }
154 - },
155 - "forwarded": {
156 - "version": "0.1.2",
157 - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
158 - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
159 - },
160 - "fresh": {
161 - "version": "0.5.2",
162 - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
163 - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
164 - },
165 - "http-errors": {
166 - "version": "1.7.2",
167 - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
168 - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
169 - "requires": {
170 - "depd": "~1.1.2",
171 - "inherits": "2.0.3",
172 - "setprototypeof": "1.1.1",
173 - "statuses": ">= 1.5.0 < 2",
174 - "toidentifier": "1.0.0"
175 - }
176 - },
177 - "iconv-lite": {
178 - "version": "0.4.24",
179 - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
180 - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
181 - "requires": {
182 - "safer-buffer": ">= 2.1.2 < 3"
183 - }
184 - },
185 - "inherits": {
186 - "version": "2.0.3",
187 - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
188 - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
189 - },
190 - "ipaddr.js": {
191 - "version": "1.9.1",
192 - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
193 - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
194 - },
195 - "media-typer": {
196 - "version": "0.3.0",
197 - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
198 - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
199 - },
200 - "merge-descriptors": {
201 - "version": "1.0.1",
202 - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
203 - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
204 - },
205 - "methods": {
206 - "version": "1.1.2",
207 - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
208 - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
209 - },
210 - "mime": {
211 - "version": "1.6.0",
212 - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
213 - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
214 - },
215 - "mime-db": {
216 - "version": "1.44.0",
217 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
218 - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
219 - },
220 - "mime-types": {
221 - "version": "2.1.27",
222 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
223 - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
224 - "requires": {
225 - "mime-db": "1.44.0"
226 - }
227 - },
228 - "ms": {
229 - "version": "2.0.0",
230 - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
231 - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
232 - },
233 - "negotiator": {
234 - "version": "0.6.2",
235 - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
236 - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
237 - },
238 - "on-finished": {
239 - "version": "2.3.0",
240 - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
241 - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
242 - "requires": {
243 - "ee-first": "1.1.1"
244 - }
245 - },
246 - "parseurl": {
247 - "version": "1.3.3",
248 - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
249 - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
250 - },
251 - "path-to-regexp": {
252 - "version": "0.1.7",
253 - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
254 - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
255 - },
256 - "proxy-addr": {
257 - "version": "2.0.6",
258 - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
259 - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==",
260 - "requires": {
261 - "forwarded": "~0.1.2",
262 - "ipaddr.js": "1.9.1"
263 - }
264 - },
265 - "qs": {
266 - "version": "6.7.0",
267 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
268 - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
269 - },
270 - "range-parser": {
271 - "version": "1.2.1",
272 - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
273 - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
274 - },
275 - "raw-body": {
276 - "version": "2.4.0",
277 - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
278 - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
279 - "requires": {
280 - "bytes": "3.1.0",
281 - "http-errors": "1.7.2",
282 - "iconv-lite": "0.4.24",
283 - "unpipe": "1.0.0"
284 - }
285 - },
286 - "safe-buffer": {
287 - "version": "5.1.2",
288 - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
289 - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
290 - },
291 - "safer-buffer": {
292 - "version": "2.1.2",
293 - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
294 - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
295 - },
296 - "send": {
297 - "version": "0.17.1",
298 - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
299 - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
300 - "requires": {
301 - "debug": "2.6.9",
302 - "depd": "~1.1.2",
303 - "destroy": "~1.0.4",
304 - "encodeurl": "~1.0.2",
305 - "escape-html": "~1.0.3",
306 - "etag": "~1.8.1",
307 - "fresh": "0.5.2",
308 - "http-errors": "~1.7.2",
309 - "mime": "1.6.0",
310 - "ms": "2.1.1",
311 - "on-finished": "~2.3.0",
312 - "range-parser": "~1.2.1",
313 - "statuses": "~1.5.0"
314 - },
315 - "dependencies": {
316 - "ms": {
317 - "version": "2.1.1",
318 - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
319 - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
320 - }
321 - }
322 - },
323 - "serve-static": {
324 - "version": "1.14.1",
325 - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
326 - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
327 - "requires": {
328 - "encodeurl": "~1.0.2",
329 - "escape-html": "~1.0.3",
330 - "parseurl": "~1.3.3",
331 - "send": "0.17.1"
332 - }
333 - },
334 - "setprototypeof": {
335 - "version": "1.1.1",
336 - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
337 - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
338 - },
339 - "statuses": {
340 - "version": "1.5.0",
341 - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
342 - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
343 - },
344 - "toidentifier": {
345 - "version": "1.0.0",
346 - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
347 - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
348 - },
349 - "type-is": {
350 - "version": "1.6.18",
351 - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
352 - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
353 - "requires": {
354 - "media-typer": "0.3.0",
355 - "mime-types": "~2.1.24"
356 - }
357 - },
358 - "unpipe": {
359 - "version": "1.0.0",
360 - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
361 - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
362 - },
363 - "utils-merge": {
364 - "version": "1.0.1",
365 - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
366 - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
367 - },
368 - "vary": {
369 - "version": "1.1.2",
370 - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
371 - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
372 - }
373 - }
374 -}
1 -{
2 - "name": "ssl",
3 - "version": "1.0.0",
4 - "description": "",
5 - "main": "app.js",
6 - "scripts": {
7 - "test": "echo \"Error: no test specified\" && exit 1"
8 - },
9 - "author": "",
10 - "license": "ISC",
11 - "dependencies": {
12 - "express": "^4.17.1"
13 - }
14 -}
1 -var express = require('express');
2 -const bodyParser = require('body-parser');
3 -var app = express();
4 -const fs = require('fs');
5 -const path = require('path');
6 -const HTTPS = require('https');
7 -const domain = "www.osschat.tk"
8 -const sslport = 23023;
9 -
10 -app.use(bodyParser.json());//json형태로 처리
11 -
12 -app.post('/hook', function (request, response) {//post방식으로 들어온다.
13 -
14 - var eventObj = request.body.events[0];
15 - var source = eventObj.source;
16 - var message = eventObj.message;
17 -
18 - // request log
19 - console.log('======================', new Date() ,'======================');
20 - console.log('[request]', request.body);
21 - console.log('[request source] ', eventObj.source);
22 - console.log('[request message]', eventObj.message);
23 -
24 - response.sendStatus(200);
25 -});
26 -
27 -
28 -try {
29 - const option = {
30 - ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
31 - key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
32 - cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
33 - };
34 -
35 - HTTPS.createServer(option, app).listen(sslport, () => {
36 - console.log(`[HTTPS] Server is started on port ${sslport}`);
37 - });
38 - } catch (error) {
39 - console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
40 - console.log(error);
41 - }
42 -
1 -{
2 - "name": "webhook",
3 - "version": "1.0.0",
4 - "lockfileVersion": 1,
5 - "requires": true,
6 - "dependencies": {
7 - "accepts": {
8 - "version": "1.3.7",
9 - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
10 - "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
11 - "requires": {
12 - "mime-types": "~2.1.24",
13 - "negotiator": "0.6.2"
14 - }
15 - },
16 - "array-flatten": {
17 - "version": "1.1.1",
18 - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
19 - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
20 - },
21 - "body-parser": {
22 - "version": "1.19.0",
23 - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
24 - "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
25 - "requires": {
26 - "bytes": "3.1.0",
27 - "content-type": "~1.0.4",
28 - "debug": "2.6.9",
29 - "depd": "~1.1.2",
30 - "http-errors": "1.7.2",
31 - "iconv-lite": "0.4.24",
32 - "on-finished": "~2.3.0",
33 - "qs": "6.7.0",
34 - "raw-body": "2.4.0",
35 - "type-is": "~1.6.17"
36 - }
37 - },
38 - "bytes": {
39 - "version": "3.1.0",
40 - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
41 - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
42 - },
43 - "content-disposition": {
44 - "version": "0.5.3",
45 - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
46 - "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
47 - "requires": {
48 - "safe-buffer": "5.1.2"
49 - }
50 - },
51 - "content-type": {
52 - "version": "1.0.4",
53 - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
54 - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
55 - },
56 - "cookie": {
57 - "version": "0.4.0",
58 - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
59 - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
60 - },
61 - "cookie-signature": {
62 - "version": "1.0.6",
63 - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
64 - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
65 - },
66 - "debug": {
67 - "version": "2.6.9",
68 - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
69 - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
70 - "requires": {
71 - "ms": "2.0.0"
72 - }
73 - },
74 - "depd": {
75 - "version": "1.1.2",
76 - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
77 - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
78 - },
79 - "destroy": {
80 - "version": "1.0.4",
81 - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
82 - "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
83 - },
84 - "ee-first": {
85 - "version": "1.1.1",
86 - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
87 - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
88 - },
89 - "encodeurl": {
90 - "version": "1.0.2",
91 - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
92 - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
93 - },
94 - "escape-html": {
95 - "version": "1.0.3",
96 - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
97 - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
98 - },
99 - "etag": {
100 - "version": "1.8.1",
101 - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
102 - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
103 - },
104 - "express": {
105 - "version": "4.17.1",
106 - "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
107 - "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
108 - "requires": {
109 - "accepts": "~1.3.7",
110 - "array-flatten": "1.1.1",
111 - "body-parser": "1.19.0",
112 - "content-disposition": "0.5.3",
113 - "content-type": "~1.0.4",
114 - "cookie": "0.4.0",
115 - "cookie-signature": "1.0.6",
116 - "debug": "2.6.9",
117 - "depd": "~1.1.2",
118 - "encodeurl": "~1.0.2",
119 - "escape-html": "~1.0.3",
120 - "etag": "~1.8.1",
121 - "finalhandler": "~1.1.2",
122 - "fresh": "0.5.2",
123 - "merge-descriptors": "1.0.1",
124 - "methods": "~1.1.2",
125 - "on-finished": "~2.3.0",
126 - "parseurl": "~1.3.3",
127 - "path-to-regexp": "0.1.7",
128 - "proxy-addr": "~2.0.5",
129 - "qs": "6.7.0",
130 - "range-parser": "~1.2.1",
131 - "safe-buffer": "5.1.2",
132 - "send": "0.17.1",
133 - "serve-static": "1.14.1",
134 - "setprototypeof": "1.1.1",
135 - "statuses": "~1.5.0",
136 - "type-is": "~1.6.18",
137 - "utils-merge": "1.0.1",
138 - "vary": "~1.1.2"
139 - }
140 - },
141 - "finalhandler": {
142 - "version": "1.1.2",
143 - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
144 - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
145 - "requires": {
146 - "debug": "2.6.9",
147 - "encodeurl": "~1.0.2",
148 - "escape-html": "~1.0.3",
149 - "on-finished": "~2.3.0",
150 - "parseurl": "~1.3.3",
151 - "statuses": "~1.5.0",
152 - "unpipe": "~1.0.0"
153 - }
154 - },
155 - "forwarded": {
156 - "version": "0.1.2",
157 - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
158 - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
159 - },
160 - "fresh": {
161 - "version": "0.5.2",
162 - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
163 - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
164 - },
165 - "http-errors": {
166 - "version": "1.7.2",
167 - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
168 - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
169 - "requires": {
170 - "depd": "~1.1.2",
171 - "inherits": "2.0.3",
172 - "setprototypeof": "1.1.1",
173 - "statuses": ">= 1.5.0 < 2",
174 - "toidentifier": "1.0.0"
175 - }
176 - },
177 - "iconv-lite": {
178 - "version": "0.4.24",
179 - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
180 - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
181 - "requires": {
182 - "safer-buffer": ">= 2.1.2 < 3"
183 - }
184 - },
185 - "inherits": {
186 - "version": "2.0.3",
187 - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
188 - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
189 - },
190 - "ipaddr.js": {
191 - "version": "1.9.1",
192 - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
193 - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
194 - },
195 - "media-typer": {
196 - "version": "0.3.0",
197 - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
198 - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
199 - },
200 - "merge-descriptors": {
201 - "version": "1.0.1",
202 - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
203 - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
204 - },
205 - "methods": {
206 - "version": "1.1.2",
207 - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
208 - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
209 - },
210 - "mime": {
211 - "version": "1.6.0",
212 - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
213 - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
214 - },
215 - "mime-db": {
216 - "version": "1.44.0",
217 - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
218 - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
219 - },
220 - "mime-types": {
221 - "version": "2.1.27",
222 - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
223 - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
224 - "requires": {
225 - "mime-db": "1.44.0"
226 - }
227 - },
228 - "ms": {
229 - "version": "2.0.0",
230 - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
231 - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
232 - },
233 - "negotiator": {
234 - "version": "0.6.2",
235 - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
236 - "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
237 - },
238 - "on-finished": {
239 - "version": "2.3.0",
240 - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
241 - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
242 - "requires": {
243 - "ee-first": "1.1.1"
244 - }
245 - },
246 - "parseurl": {
247 - "version": "1.3.3",
248 - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
249 - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
250 - },
251 - "path-to-regexp": {
252 - "version": "0.1.7",
253 - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
254 - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
255 - },
256 - "proxy-addr": {
257 - "version": "2.0.6",
258 - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
259 - "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==",
260 - "requires": {
261 - "forwarded": "~0.1.2",
262 - "ipaddr.js": "1.9.1"
263 - }
264 - },
265 - "qs": {
266 - "version": "6.7.0",
267 - "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
268 - "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
269 - },
270 - "range-parser": {
271 - "version": "1.2.1",
272 - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
273 - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
274 - },
275 - "raw-body": {
276 - "version": "2.4.0",
277 - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
278 - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
279 - "requires": {
280 - "bytes": "3.1.0",
281 - "http-errors": "1.7.2",
282 - "iconv-lite": "0.4.24",
283 - "unpipe": "1.0.0"
284 - }
285 - },
286 - "safe-buffer": {
287 - "version": "5.1.2",
288 - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
289 - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
290 - },
291 - "safer-buffer": {
292 - "version": "2.1.2",
293 - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
294 - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
295 - },
296 - "send": {
297 - "version": "0.17.1",
298 - "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
299 - "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
300 - "requires": {
301 - "debug": "2.6.9",
302 - "depd": "~1.1.2",
303 - "destroy": "~1.0.4",
304 - "encodeurl": "~1.0.2",
305 - "escape-html": "~1.0.3",
306 - "etag": "~1.8.1",
307 - "fresh": "0.5.2",
308 - "http-errors": "~1.7.2",
309 - "mime": "1.6.0",
310 - "ms": "2.1.1",
311 - "on-finished": "~2.3.0",
312 - "range-parser": "~1.2.1",
313 - "statuses": "~1.5.0"
314 - },
315 - "dependencies": {
316 - "ms": {
317 - "version": "2.1.1",
318 - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
319 - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
320 - }
321 - }
322 - },
323 - "serve-static": {
324 - "version": "1.14.1",
325 - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
326 - "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
327 - "requires": {
328 - "encodeurl": "~1.0.2",
329 - "escape-html": "~1.0.3",
330 - "parseurl": "~1.3.3",
331 - "send": "0.17.1"
332 - }
333 - },
334 - "setprototypeof": {
335 - "version": "1.1.1",
336 - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
337 - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
338 - },
339 - "statuses": {
340 - "version": "1.5.0",
341 - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
342 - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
343 - },
344 - "toidentifier": {
345 - "version": "1.0.0",
346 - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
347 - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
348 - },
349 - "type-is": {
350 - "version": "1.6.18",
351 - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
352 - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
353 - "requires": {
354 - "media-typer": "0.3.0",
355 - "mime-types": "~2.1.24"
356 - }
357 - },
358 - "unpipe": {
359 - "version": "1.0.0",
360 - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
361 - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
362 - },
363 - "utils-merge": {
364 - "version": "1.0.1",
365 - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
366 - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
367 - },
368 - "vary": {
369 - "version": "1.1.2",
370 - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
371 - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
372 - }
373 - }
374 -}
1 -{
2 - "name": "webhook",
3 - "version": "1.0.0",
4 - "description": "",
5 - "main": "app.js",
6 - "scripts": {
7 - "test": "echo \"Error: no test specified\" && exit 1"
8 - },
9 - "author": "",
10 - "license": "ISC",
11 - "dependencies": {
12 - "body-parser": "^1.19.0",
13 - "express": "^4.17.1"
14 - }
15 -}