hellowhales

Implement API handler

1 +let request = require('request');
2 +let options = {
3 + 'method': 'GET',
4 + 'url': 'http://api.visitkorea.or.kr/openapi/service/rest/KorService/areaBasedList?ServiceKey=2lFkvQJYgzOOhwUKiUt8aZVNpd1PpBOf%2FfMNW17cl25DE0GUEDddeR9iGnuSUpggjUoIUgamfhcvnKQ3eH1dAw%3D%3D&contentTypeId=15&areaCode=&sigunguCode=&cat1=&cat2=&cat3=&listYN=Y&MobileOS=ETC&MobileApp=TourAPI3.0_Guide&arrange=A&numOfRows=12&pageNo=1&_type=json',
5 + 'headers': {
6 + }
7 +};
8 +request(options, function (error, response, body) {
9 + if (error) {
10 + throw new Error(error);
11 + }
12 + let info = JSON.parse(body);
13 +
14 + for (i in info['response']['body']['items']['item']) {
15 + console.log('축제 : ' + info['response']['body']['items']['item'][i]['title']);
16 + console.log('축제 주소 : ' + info['response']['body']['items']['item'][i]['addr1']);
17 + console.log(
18 + '전화번호 : ' + info['response']['body']['items']['item'][i]['tel']
19 + );
20 + console.log('축제위도 : ' + info['response']['body']['items']['item'][i]['mapx']);
21 + console.log('축제경도 : ' + info['response']['body']['items']['item'][i]['mapy']);
22 + console.log(" ")
23 + }
24 +});
25 +
...\ No newline at end of file ...\ No newline at end of file
1 +const mongoose =require('mongoose');
2 +const { Schema } =mongoose;
3 +
4 +const festivalSchema = new Schema({
5 + title: String,
6 + addr: String,
7 + tel: String,
8 + mapx : Number,
9 + mapy : Number
10 +},
11 +{
12 + timestamps: true
13 +}
14 +);
15 +
16 +
17 +module.exports = mongoose.model('Festival',festivalSchema);
1 +{
2 + "name": "REST-API",
3 + "version": "1.0.0",
4 + "lockfileVersion": 1,
5 + "requires": true,
6 + "dependencies": {
7 + "@types/node": {
8 + "version": "16.11.9",
9 + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.9.tgz",
10 + "integrity": "sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A=="
11 + },
12 + "@types/webidl-conversions": {
13 + "version": "6.1.1",
14 + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-6.1.1.tgz",
15 + "integrity": "sha512-XAahCdThVuCFDQLT7R7Pk/vqeObFNL3YqRyFZg+AqAP/W1/w3xHaIxuW7WszQqTbIBOPRcItYJIou3i/mppu3Q=="
16 + },
17 + "@types/whatwg-url": {
18 + "version": "8.2.1",
19 + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-8.2.1.tgz",
20 + "integrity": "sha512-2YubE1sjj5ifxievI5Ge1sckb9k/Er66HyR2c+3+I6VDUUg1TLPdYYTEbQ+DjRkS4nTxMJhgWfSfMRD2sl2EYQ==",
21 + "requires": {
22 + "@types/node": "*",
23 + "@types/webidl-conversions": "*"
24 + }
25 + },
26 + "accepts": {
27 + "version": "1.3.7",
28 + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
29 + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
30 + "requires": {
31 + "mime-types": "~2.1.24",
32 + "negotiator": "0.6.2"
33 + }
34 + },
35 + "ajv": {
36 + "version": "6.12.6",
37 + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
38 + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
39 + "requires": {
40 + "fast-deep-equal": "^3.1.1",
41 + "fast-json-stable-stringify": "^2.0.0",
42 + "json-schema-traverse": "^0.4.1",
43 + "uri-js": "^4.2.2"
44 + }
45 + },
46 + "array-flatten": {
47 + "version": "1.1.1",
48 + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
49 + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
50 + },
51 + "asn1": {
52 + "version": "0.2.6",
53 + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
54 + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
55 + "requires": {
56 + "safer-buffer": "~2.1.0"
57 + }
58 + },
59 + "assert-plus": {
60 + "version": "1.0.0",
61 + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
62 + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
63 + },
64 + "asynckit": {
65 + "version": "0.4.0",
66 + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
67 + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
68 + },
69 + "aws-sign2": {
70 + "version": "0.7.0",
71 + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
72 + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg="
73 + },
74 + "aws4": {
75 + "version": "1.11.0",
76 + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
77 + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
78 + },
79 + "base64-js": {
80 + "version": "1.5.1",
81 + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
82 + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
83 + },
84 + "bcrypt-pbkdf": {
85 + "version": "1.0.2",
86 + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
87 + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
88 + "requires": {
89 + "tweetnacl": "^0.14.3"
90 + }
91 + },
92 + "body-parser": {
93 + "version": "1.19.0",
94 + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
95 + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
96 + "requires": {
97 + "bytes": "3.1.0",
98 + "content-type": "~1.0.4",
99 + "debug": "2.6.9",
100 + "depd": "~1.1.2",
101 + "http-errors": "1.7.2",
102 + "iconv-lite": "0.4.24",
103 + "on-finished": "~2.3.0",
104 + "qs": "6.7.0",
105 + "raw-body": "2.4.0",
106 + "type-is": "~1.6.17"
107 + },
108 + "dependencies": {
109 + "qs": {
110 + "version": "6.7.0",
111 + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
112 + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
113 + }
114 + }
115 + },
116 + "bson": {
117 + "version": "4.5.4",
118 + "resolved": "https://registry.npmjs.org/bson/-/bson-4.5.4.tgz",
119 + "integrity": "sha512-wIt0bPACnx8Ju9r6IsS2wVtGDHBr9Dxb+U29A1YED2pu8XOhS8aKjOnLZ8sxyXkPwanoK7iWWVhS1+coxde6xA==",
120 + "requires": {
121 + "buffer": "^5.6.0"
122 + }
123 + },
124 + "buffer": {
125 + "version": "5.7.1",
126 + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
127 + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
128 + "requires": {
129 + "base64-js": "^1.3.1",
130 + "ieee754": "^1.1.13"
131 + }
132 + },
133 + "bytes": {
134 + "version": "3.1.0",
135 + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
136 + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
137 + },
138 + "caseless": {
139 + "version": "0.12.0",
140 + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
141 + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
142 + },
143 + "combined-stream": {
144 + "version": "1.0.8",
145 + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
146 + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
147 + "requires": {
148 + "delayed-stream": "~1.0.0"
149 + }
150 + },
151 + "content-disposition": {
152 + "version": "0.5.3",
153 + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
154 + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
155 + "requires": {
156 + "safe-buffer": "5.1.2"
157 + },
158 + "dependencies": {
159 + "safe-buffer": {
160 + "version": "5.1.2",
161 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
162 + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
163 + }
164 + }
165 + },
166 + "content-type": {
167 + "version": "1.0.4",
168 + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
169 + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
170 + },
171 + "cookie": {
172 + "version": "0.4.0",
173 + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
174 + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
175 + },
176 + "cookie-signature": {
177 + "version": "1.0.6",
178 + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
179 + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
180 + },
181 + "core-util-is": {
182 + "version": "1.0.2",
183 + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
184 + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
185 + },
186 + "dashdash": {
187 + "version": "1.14.1",
188 + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
189 + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
190 + "requires": {
191 + "assert-plus": "^1.0.0"
192 + }
193 + },
194 + "debug": {
195 + "version": "2.6.9",
196 + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
197 + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
198 + "requires": {
199 + "ms": "2.0.0"
200 + }
201 + },
202 + "delayed-stream": {
203 + "version": "1.0.0",
204 + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
205 + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
206 + },
207 + "denque": {
208 + "version": "2.0.1",
209 + "resolved": "https://registry.npmjs.org/denque/-/denque-2.0.1.tgz",
210 + "integrity": "sha512-tfiWc6BQLXNLpNiR5iGd0Ocu3P3VpxfzFiqubLgMfhfOw9WyvgJBd46CClNn9k3qfbjvT//0cf7AlYRX/OslMQ=="
211 + },
212 + "depd": {
213 + "version": "1.1.2",
214 + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
215 + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
216 + },
217 + "destroy": {
218 + "version": "1.0.4",
219 + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
220 + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
221 + },
222 + "dotenv": {
223 + "version": "10.0.0",
224 + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
225 + "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q=="
226 + },
227 + "ecc-jsbn": {
228 + "version": "0.1.2",
229 + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
230 + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
231 + "requires": {
232 + "jsbn": "~0.1.0",
233 + "safer-buffer": "^2.1.0"
234 + }
235 + },
236 + "ee-first": {
237 + "version": "1.1.1",
238 + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
239 + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
240 + },
241 + "encodeurl": {
242 + "version": "1.0.2",
243 + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
244 + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
245 + },
246 + "escape-html": {
247 + "version": "1.0.3",
248 + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
249 + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
250 + },
251 + "etag": {
252 + "version": "1.8.1",
253 + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
254 + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
255 + },
256 + "express": {
257 + "version": "4.17.1",
258 + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
259 + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
260 + "requires": {
261 + "accepts": "~1.3.7",
262 + "array-flatten": "1.1.1",
263 + "body-parser": "1.19.0",
264 + "content-disposition": "0.5.3",
265 + "content-type": "~1.0.4",
266 + "cookie": "0.4.0",
267 + "cookie-signature": "1.0.6",
268 + "debug": "2.6.9",
269 + "depd": "~1.1.2",
270 + "encodeurl": "~1.0.2",
271 + "escape-html": "~1.0.3",
272 + "etag": "~1.8.1",
273 + "finalhandler": "~1.1.2",
274 + "fresh": "0.5.2",
275 + "merge-descriptors": "1.0.1",
276 + "methods": "~1.1.2",
277 + "on-finished": "~2.3.0",
278 + "parseurl": "~1.3.3",
279 + "path-to-regexp": "0.1.7",
280 + "proxy-addr": "~2.0.5",
281 + "qs": "6.7.0",
282 + "range-parser": "~1.2.1",
283 + "safe-buffer": "5.1.2",
284 + "send": "0.17.1",
285 + "serve-static": "1.14.1",
286 + "setprototypeof": "1.1.1",
287 + "statuses": "~1.5.0",
288 + "type-is": "~1.6.18",
289 + "utils-merge": "1.0.1",
290 + "vary": "~1.1.2"
291 + },
292 + "dependencies": {
293 + "qs": {
294 + "version": "6.7.0",
295 + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
296 + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
297 + },
298 + "safe-buffer": {
299 + "version": "5.1.2",
300 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
301 + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
302 + }
303 + }
304 + },
305 + "extend": {
306 + "version": "3.0.2",
307 + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
308 + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g=="
309 + },
310 + "extsprintf": {
311 + "version": "1.3.0",
312 + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
313 + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
314 + },
315 + "fast-deep-equal": {
316 + "version": "3.1.3",
317 + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
318 + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
319 + },
320 + "fast-json-stable-stringify": {
321 + "version": "2.1.0",
322 + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
323 + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
324 + },
325 + "finalhandler": {
326 + "version": "1.1.2",
327 + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
328 + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
329 + "requires": {
330 + "debug": "2.6.9",
331 + "encodeurl": "~1.0.2",
332 + "escape-html": "~1.0.3",
333 + "on-finished": "~2.3.0",
334 + "parseurl": "~1.3.3",
335 + "statuses": "~1.5.0",
336 + "unpipe": "~1.0.0"
337 + }
338 + },
339 + "forever-agent": {
340 + "version": "0.6.1",
341 + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
342 + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
343 + },
344 + "form-data": {
345 + "version": "2.3.3",
346 + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
347 + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
348 + "requires": {
349 + "asynckit": "^0.4.0",
350 + "combined-stream": "^1.0.6",
351 + "mime-types": "^2.1.12"
352 + }
353 + },
354 + "forwarded": {
355 + "version": "0.2.0",
356 + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
357 + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
358 + },
359 + "fresh": {
360 + "version": "0.5.2",
361 + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
362 + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
363 + },
364 + "getpass": {
365 + "version": "0.1.7",
366 + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
367 + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
368 + "requires": {
369 + "assert-plus": "^1.0.0"
370 + }
371 + },
372 + "har-schema": {
373 + "version": "2.0.0",
374 + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
375 + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI="
376 + },
377 + "har-validator": {
378 + "version": "5.1.5",
379 + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
380 + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
381 + "requires": {
382 + "ajv": "^6.12.3",
383 + "har-schema": "^2.0.0"
384 + }
385 + },
386 + "http-errors": {
387 + "version": "1.7.2",
388 + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
389 + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
390 + "requires": {
391 + "depd": "~1.1.2",
392 + "inherits": "2.0.3",
393 + "setprototypeof": "1.1.1",
394 + "statuses": ">= 1.5.0 < 2",
395 + "toidentifier": "1.0.0"
396 + }
397 + },
398 + "http-signature": {
399 + "version": "1.2.0",
400 + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
401 + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
402 + "requires": {
403 + "assert-plus": "^1.0.0",
404 + "jsprim": "^1.2.2",
405 + "sshpk": "^1.7.0"
406 + }
407 + },
408 + "iconv-lite": {
409 + "version": "0.4.24",
410 + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
411 + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
412 + "requires": {
413 + "safer-buffer": ">= 2.1.2 < 3"
414 + }
415 + },
416 + "ieee754": {
417 + "version": "1.2.1",
418 + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
419 + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
420 + },
421 + "inherits": {
422 + "version": "2.0.3",
423 + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
424 + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
425 + },
426 + "ipaddr.js": {
427 + "version": "1.9.1",
428 + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
429 + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
430 + },
431 + "is-typedarray": {
432 + "version": "1.0.0",
433 + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
434 + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
435 + },
436 + "isstream": {
437 + "version": "0.1.2",
438 + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
439 + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
440 + },
441 + "jsbn": {
442 + "version": "0.1.1",
443 + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
444 + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
445 + },
446 + "json-schema": {
447 + "version": "0.2.3",
448 + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
449 + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
450 + },
451 + "json-schema-traverse": {
452 + "version": "0.4.1",
453 + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
454 + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
455 + },
456 + "json-stringify-safe": {
457 + "version": "5.0.1",
458 + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
459 + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
460 + },
461 + "jsprim": {
462 + "version": "1.4.1",
463 + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
464 + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
465 + "requires": {
466 + "assert-plus": "1.0.0",
467 + "extsprintf": "1.3.0",
468 + "json-schema": "0.2.3",
469 + "verror": "1.10.0"
470 + }
471 + },
472 + "kareem": {
473 + "version": "2.3.2",
474 + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz",
475 + "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ=="
476 + },
477 + "media-typer": {
478 + "version": "0.3.0",
479 + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
480 + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
481 + },
482 + "memory-pager": {
483 + "version": "1.5.0",
484 + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
485 + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
486 + "optional": true
487 + },
488 + "merge-descriptors": {
489 + "version": "1.0.1",
490 + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
491 + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
492 + },
493 + "methods": {
494 + "version": "1.1.2",
495 + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
496 + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
497 + },
498 + "mime": {
499 + "version": "1.6.0",
500 + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
501 + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
502 + },
503 + "mime-db": {
504 + "version": "1.51.0",
505 + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
506 + "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g=="
507 + },
508 + "mime-types": {
509 + "version": "2.1.34",
510 + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
511 + "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
512 + "requires": {
513 + "mime-db": "1.51.0"
514 + }
515 + },
516 + "mongodb": {
517 + "version": "4.1.4",
518 + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-4.1.4.tgz",
519 + "integrity": "sha512-Cv/sk8on/tpvvqbEvR1h03mdyNdyvvO+WhtFlL4jrZ+DSsN/oSQHVqmJQI/sBCqqbOArFcYCAYDfyzqFwV4GSQ==",
520 + "requires": {
521 + "bson": "^4.5.4",
522 + "denque": "^2.0.1",
523 + "mongodb-connection-string-url": "^2.1.0",
524 + "saslprep": "^1.0.3"
525 + }
526 + },
527 + "mongodb-connection-string-url": {
528 + "version": "2.2.0",
529 + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-2.2.0.tgz",
530 + "integrity": "sha512-U0cDxLUrQrl7DZA828CA+o69EuWPWEJTwdMPozyd7cy/dbtncUZczMw7wRHcwMD7oKOn0NM2tF9jdf5FFVW9CA==",
531 + "requires": {
532 + "@types/whatwg-url": "^8.2.1",
533 + "whatwg-url": "^11.0.0"
534 + }
535 + },
536 + "mongoose": {
537 + "version": "6.0.13",
538 + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.0.13.tgz",
539 + "integrity": "sha512-/M/YKgx23fCX+j0lwObaHbCibXnMjyWeQrXZf0WaQeS/hL86wQVSmaOxh+kZXfyLOUr+vT2Hl44o50GZHUrKWw==",
540 + "requires": {
541 + "bson": "^4.2.2",
542 + "kareem": "2.3.2",
543 + "mongodb": "4.1.4",
544 + "mpath": "0.8.4",
545 + "mquery": "4.0.0",
546 + "ms": "2.1.2",
547 + "regexp-clone": "1.0.0",
548 + "sift": "13.5.2",
549 + "sliced": "1.0.1"
550 + },
551 + "dependencies": {
552 + "ms": {
553 + "version": "2.1.2",
554 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
555 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
556 + }
557 + }
558 + },
559 + "mpath": {
560 + "version": "0.8.4",
561 + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
562 + "integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g=="
563 + },
564 + "mquery": {
565 + "version": "4.0.0",
566 + "resolved": "https://registry.npmjs.org/mquery/-/mquery-4.0.0.tgz",
567 + "integrity": "sha512-nGjm89lHja+T/b8cybAby6H0YgA4qYC/lx6UlwvHGqvTq8bDaNeCwl1sY8uRELrNbVWJzIihxVd+vphGGn1vBw==",
568 + "requires": {
569 + "debug": "4.x",
570 + "regexp-clone": "^1.0.0",
571 + "sliced": "1.0.1"
572 + },
573 + "dependencies": {
574 + "debug": {
575 + "version": "4.3.2",
576 + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
577 + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
578 + "requires": {
579 + "ms": "2.1.2"
580 + }
581 + },
582 + "ms": {
583 + "version": "2.1.2",
584 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
585 + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
586 + }
587 + }
588 + },
589 + "ms": {
590 + "version": "2.0.0",
591 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
592 + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
593 + },
594 + "negotiator": {
595 + "version": "0.6.2",
596 + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
597 + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
598 + },
599 + "oauth-sign": {
600 + "version": "0.9.0",
601 + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
602 + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ=="
603 + },
604 + "on-finished": {
605 + "version": "2.3.0",
606 + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
607 + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
608 + "requires": {
609 + "ee-first": "1.1.1"
610 + }
611 + },
612 + "parseurl": {
613 + "version": "1.3.3",
614 + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
615 + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
616 + },
617 + "path-to-regexp": {
618 + "version": "0.1.7",
619 + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
620 + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
621 + },
622 + "performance-now": {
623 + "version": "2.1.0",
624 + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
625 + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
626 + },
627 + "proxy-addr": {
628 + "version": "2.0.7",
629 + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
630 + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
631 + "requires": {
632 + "forwarded": "0.2.0",
633 + "ipaddr.js": "1.9.1"
634 + }
635 + },
636 + "psl": {
637 + "version": "1.8.0",
638 + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
639 + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
640 + },
641 + "punycode": {
642 + "version": "2.1.1",
643 + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
644 + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
645 + },
646 + "qs": {
647 + "version": "6.5.2",
648 + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
649 + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
650 + },
651 + "range-parser": {
652 + "version": "1.2.1",
653 + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
654 + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
655 + },
656 + "raw-body": {
657 + "version": "2.4.0",
658 + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
659 + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
660 + "requires": {
661 + "bytes": "3.1.0",
662 + "http-errors": "1.7.2",
663 + "iconv-lite": "0.4.24",
664 + "unpipe": "1.0.0"
665 + }
666 + },
667 + "regexp-clone": {
668 + "version": "1.0.0",
669 + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
670 + "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
671 + },
672 + "request": {
673 + "version": "2.88.2",
674 + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
675 + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
676 + "requires": {
677 + "aws-sign2": "~0.7.0",
678 + "aws4": "^1.8.0",
679 + "caseless": "~0.12.0",
680 + "combined-stream": "~1.0.6",
681 + "extend": "~3.0.2",
682 + "forever-agent": "~0.6.1",
683 + "form-data": "~2.3.2",
684 + "har-validator": "~5.1.3",
685 + "http-signature": "~1.2.0",
686 + "is-typedarray": "~1.0.0",
687 + "isstream": "~0.1.2",
688 + "json-stringify-safe": "~5.0.1",
689 + "mime-types": "~2.1.19",
690 + "oauth-sign": "~0.9.0",
691 + "performance-now": "^2.1.0",
692 + "qs": "~6.5.2",
693 + "safe-buffer": "^5.1.2",
694 + "tough-cookie": "~2.5.0",
695 + "tunnel-agent": "^0.6.0",
696 + "uuid": "^3.3.2"
697 + }
698 + },
699 + "safe-buffer": {
700 + "version": "5.2.1",
701 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
702 + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
703 + },
704 + "safer-buffer": {
705 + "version": "2.1.2",
706 + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
707 + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
708 + },
709 + "saslprep": {
710 + "version": "1.0.3",
711 + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
712 + "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
713 + "optional": true,
714 + "requires": {
715 + "sparse-bitfield": "^3.0.3"
716 + }
717 + },
718 + "send": {
719 + "version": "0.17.1",
720 + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
721 + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
722 + "requires": {
723 + "debug": "2.6.9",
724 + "depd": "~1.1.2",
725 + "destroy": "~1.0.4",
726 + "encodeurl": "~1.0.2",
727 + "escape-html": "~1.0.3",
728 + "etag": "~1.8.1",
729 + "fresh": "0.5.2",
730 + "http-errors": "~1.7.2",
731 + "mime": "1.6.0",
732 + "ms": "2.1.1",
733 + "on-finished": "~2.3.0",
734 + "range-parser": "~1.2.1",
735 + "statuses": "~1.5.0"
736 + },
737 + "dependencies": {
738 + "ms": {
739 + "version": "2.1.1",
740 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
741 + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
742 + }
743 + }
744 + },
745 + "serve-static": {
746 + "version": "1.14.1",
747 + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
748 + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
749 + "requires": {
750 + "encodeurl": "~1.0.2",
751 + "escape-html": "~1.0.3",
752 + "parseurl": "~1.3.3",
753 + "send": "0.17.1"
754 + }
755 + },
756 + "setprototypeof": {
757 + "version": "1.1.1",
758 + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
759 + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
760 + },
761 + "sift": {
762 + "version": "13.5.2",
763 + "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
764 + "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA=="
765 + },
766 + "sliced": {
767 + "version": "1.0.1",
768 + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
769 + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
770 + },
771 + "sparse-bitfield": {
772 + "version": "3.0.3",
773 + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
774 + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=",
775 + "optional": true,
776 + "requires": {
777 + "memory-pager": "^1.0.2"
778 + }
779 + },
780 + "sshpk": {
781 + "version": "1.16.1",
782 + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
783 + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
784 + "requires": {
785 + "asn1": "~0.2.3",
786 + "assert-plus": "^1.0.0",
787 + "bcrypt-pbkdf": "^1.0.0",
788 + "dashdash": "^1.12.0",
789 + "ecc-jsbn": "~0.1.1",
790 + "getpass": "^0.1.1",
791 + "jsbn": "~0.1.0",
792 + "safer-buffer": "^2.0.2",
793 + "tweetnacl": "~0.14.0"
794 + }
795 + },
796 + "statuses": {
797 + "version": "1.5.0",
798 + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
799 + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
800 + },
801 + "toidentifier": {
802 + "version": "1.0.0",
803 + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
804 + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
805 + },
806 + "tough-cookie": {
807 + "version": "2.5.0",
808 + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
809 + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
810 + "requires": {
811 + "psl": "^1.1.28",
812 + "punycode": "^2.1.1"
813 + }
814 + },
815 + "tr46": {
816 + "version": "3.0.0",
817 + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz",
818 + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==",
819 + "requires": {
820 + "punycode": "^2.1.1"
821 + }
822 + },
823 + "tunnel-agent": {
824 + "version": "0.6.0",
825 + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
826 + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
827 + "requires": {
828 + "safe-buffer": "^5.0.1"
829 + }
830 + },
831 + "tweetnacl": {
832 + "version": "0.14.5",
833 + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
834 + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
835 + },
836 + "type-is": {
837 + "version": "1.6.18",
838 + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
839 + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
840 + "requires": {
841 + "media-typer": "0.3.0",
842 + "mime-types": "~2.1.24"
843 + }
844 + },
845 + "unpipe": {
846 + "version": "1.0.0",
847 + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
848 + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
849 + },
850 + "uri-js": {
851 + "version": "4.4.1",
852 + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
853 + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
854 + "requires": {
855 + "punycode": "^2.1.0"
856 + }
857 + },
858 + "utils-merge": {
859 + "version": "1.0.1",
860 + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
861 + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
862 + },
863 + "uuid": {
864 + "version": "3.4.0",
865 + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
866 + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A=="
867 + },
868 + "vary": {
869 + "version": "1.1.2",
870 + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
871 + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
872 + },
873 + "verror": {
874 + "version": "1.10.0",
875 + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
876 + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
877 + "requires": {
878 + "assert-plus": "^1.0.0",
879 + "core-util-is": "1.0.2",
880 + "extsprintf": "^1.2.0"
881 + }
882 + },
883 + "webidl-conversions": {
884 + "version": "7.0.0",
885 + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
886 + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g=="
887 + },
888 + "whatwg-url": {
889 + "version": "11.0.0",
890 + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz",
891 + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==",
892 + "requires": {
893 + "tr46": "^3.0.0",
894 + "webidl-conversions": "^7.0.0"
895 + }
896 + }
897 + }
898 +}
1 { 1 {
2 - "name": "tft", 2 + "name": "REST-API",
3 - "version": "0.0.0", 3 + "version": "1.0.0",
4 - "private": true, 4 + "description": "",
5 + "main": "index.js",
5 "scripts": { 6 "scripts": {
6 - "start": "node ./bin/www" 7 + "test": "echo \"Error: no test specified\" && exit 1"
7 }, 8 },
9 + "keywords": [],
10 + "author": "",
11 + "license": "ISC",
8 "dependencies": { 12 "dependencies": {
9 - "cookie-parser": "~1.4.4", 13 + "dotenv": "^10.0.0",
10 - "debug": "~2.6.9", 14 + "express": "^4.17.1",
11 - "ejs": "~2.6.1", 15 + "mongoose": "^6.0.13",
12 - "express": "~4.16.1", 16 + "request": "^2.88.2"
13 - "http-errors": "~1.6.3",
14 - "morgan": "~1.9.1"
15 } 17 }
16 } 18 }
......
1 +const express = require('express');
2 +const mongoose =require('mongoose');
3 +const server = express();
4 +const Festival =require('./models/Festival');
5 +require("dotenv").config({ path: "variables.env"});
6 +
7 +let request = require('request');
8 +let options = {
9 + 'method': 'GET',
10 + 'url': 'http://api.visitkorea.or.kr/openapi/service/rest/KorService/areaBasedList?ServiceKey=2lFkvQJYgzOOhwUKiUt8aZVNpd1PpBOf%2FfMNW17cl25DE0GUEDddeR9iGnuSUpggjUoIUgamfhcvnKQ3eH1dAw%3D%3D&contentTypeId=15&areaCode=&sigunguCode=&cat1=&cat2=&cat3=&listYN=Y&MobileOS=ETC&MobileApp=TourAPI3.0_Guide&arrange=A&numOfRows=12&pageNo=1&_type=json',
11 + 'headers': {
12 + }
13 +};
14 +request(options, function (error, response, body) {
15 + if (error) {
16 + throw new Error(error);
17 + }
18 + let info = JSON.parse(body);
19 +
20 +
21 +
22 + server.get('/',(req,res)=>{
23 + const newFestival =new Festival();
24 + newFestival.title =info['response']['body']['items']['item'][11]['title'];
25 + newFestival.addr =info['response']['body']['items']['item'][11]['addr1'];
26 + newFestival.tel = info['response']['body']['items']['item'][11]['tel'];
27 + newFestival.mapx = info['response']['body']['items']['item'][11]['mapx'];
28 + newFestival.mapy =info['response']['body']['items']['item'][11]['mapy'];
29 + newFestival.save().then((festival)=>
30 + {
31 + console.log(festival);
32 + res.json({
33 + message:'Festival Created Successfully'
34 + });
35 + })
36 + .catch((err)=>
37 + {
38 + res.json({
39 + message:'Festival was not successfully created'
40 + });
41 + });
42 + });
43 +});
44 +
45 +server.listen(3000,(err)=>{
46 + if(err){
47 + return console.log(err);
48 + }else{
49 + mongoose.connect(process.env.MONGODB_URL,{useNewUrlParser:true},(err)=>{
50 + if(err){
51 + console.log(err);
52 + }else{
53 + console.log("Connected to database successfully");
54 + }
55 + });
56 + }
57 +})
1 +MONGODB_URL = mongodb+srv://hellowhales:qogudtjr`12@cluster0.7gz7l.mongodb.net/myFirstDatabase?retryWrites=true&w=majority
...\ No newline at end of file ...\ No newline at end of file