권주희

Merge branch 'feature/air_condition' into 'develop'

make get airCondition API

- make get airCondition API according to latitude, longitude

See merge request !2
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
2 2
3 # dependencies 3 # dependencies
4 frontend/node_modules/* 4 frontend/node_modules/*
5 +backend/node_modules/*
5 /.pnp 6 /.pnp
6 .pnp.js 7 .pnp.js
7 8
...@@ -21,3 +22,4 @@ frontend/node_modules/* ...@@ -21,3 +22,4 @@ frontend/node_modules/*
21 npm-debug.log* 22 npm-debug.log*
22 yarn-debug.log* 23 yarn-debug.log*
23 yarn-error.log* 24 yarn-error.log*
25 +secrets.json
...\ No newline at end of file ...\ No newline at end of file
......
1 -var createError = require('http-errors'); 1 +var createError = require("http-errors");
2 -var express = require('express'); 2 +var express = require("express");
3 -var path = require('path'); 3 +var path = require("path");
4 -var cookieParser = require('cookie-parser'); 4 +var cookieParser = require("cookie-parser");
5 -var logger = require('morgan'); 5 +var logger = require("morgan");
6 6
7 -var indexRouter = require('./routes/index'); 7 +var indexRouter = require("./routes/index");
8 -var usersRouter = require('./routes/users'); 8 +var usersRouter = require("./routes/users");
9 +var airConditionRouter = require("./routes/airCondition");
9 10
10 var app = express(); 11 var app = express();
11 12
12 // view engine setup 13 // view engine setup
13 -app.set('views', path.join(__dirname, 'views')); 14 +app.set("views", path.join(__dirname, "views"));
14 -app.set('view engine', 'pug'); 15 +app.set("view engine", "pug");
15 16
16 -app.use(logger('dev')); 17 +app.use(logger("dev"));
17 app.use(express.json()); 18 app.use(express.json());
18 app.use(express.urlencoded({ extended: false })); 19 app.use(express.urlencoded({ extended: false }));
19 app.use(cookieParser()); 20 app.use(cookieParser());
20 -app.use(express.static(path.join(__dirname, 'public'))); 21 +app.use(express.static(path.join(__dirname, "public")));
21 22
22 -app.use('/', indexRouter); 23 +app.use("/", indexRouter);
23 -app.use('/users', usersRouter); 24 +app.use("/users", usersRouter);
25 +app.use("/airCondition", airConditionRouter);
24 26
25 // catch 404 and forward to error handler 27 // catch 404 and forward to error handler
26 -app.use(function(req, res, next) { 28 +app.use(function (req, res, next) {
27 next(createError(404)); 29 next(createError(404));
28 }); 30 });
29 31
30 // error handler 32 // error handler
31 -app.use(function(err, req, res, next) { 33 +app.use(function (err, req, res, next) {
32 // set locals, only providing error in development 34 // set locals, only providing error in development
33 res.locals.message = err.message; 35 res.locals.message = err.message;
34 - res.locals.error = req.app.get('env') === 'development' ? err : {}; 36 + res.locals.error = req.app.get("env") === "development" ? err : {};
35 37
36 // render the error page 38 // render the error page
37 res.status(err.status || 500); 39 res.status(err.status || 500);
38 - res.render('error'); 40 + res.render("error");
39 }); 41 });
40 42
41 module.exports = app; 43 module.exports = app;
......
1 +{
2 + "name": "backend",
3 + "version": "0.0.0",
4 + "lockfileVersion": 1,
5 + "requires": true,
6 + "dependencies": {
7 + "@types/babel-types": {
8 + "version": "7.0.7",
9 + "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.7.tgz",
10 + "integrity": "sha512-dBtBbrc+qTHy1WdfHYjBwRln4+LWqASWakLHsWHR2NWHIFkv4W3O070IGoGLEBrJBvct3r0L1BUPuvURi7kYUQ=="
11 + },
12 + "@types/babylon": {
13 + "version": "6.16.5",
14 + "resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz",
15 + "integrity": "sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w==",
16 + "requires": {
17 + "@types/babel-types": "*"
18 + }
19 + },
20 + "accepts": {
21 + "version": "1.3.7",
22 + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
23 + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
24 + "requires": {
25 + "mime-types": "~2.1.24",
26 + "negotiator": "0.6.2"
27 + }
28 + },
29 + "acorn": {
30 + "version": "3.3.0",
31 + "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
32 + "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo="
33 + },
34 + "acorn-globals": {
35 + "version": "3.1.0",
36 + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-3.1.0.tgz",
37 + "integrity": "sha1-/YJw9x+7SZawBPqIDuXUZXOnMb8=",
38 + "requires": {
39 + "acorn": "^4.0.4"
40 + },
41 + "dependencies": {
42 + "acorn": {
43 + "version": "4.0.13",
44 + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
45 + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c="
46 + }
47 + }
48 + },
49 + "align-text": {
50 + "version": "0.1.4",
51 + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
52 + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
53 + "requires": {
54 + "kind-of": "^3.0.2",
55 + "longest": "^1.0.1",
56 + "repeat-string": "^1.5.2"
57 + }
58 + },
59 + "amdefine": {
60 + "version": "1.0.1",
61 + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
62 + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
63 + },
64 + "array-flatten": {
65 + "version": "1.1.1",
66 + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
67 + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
68 + },
69 + "asap": {
70 + "version": "2.0.6",
71 + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
72 + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
73 + },
74 + "axios": {
75 + "version": "0.19.2",
76 + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
77 + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
78 + "requires": {
79 + "follow-redirects": "1.5.10"
80 + }
81 + },
82 + "babel-runtime": {
83 + "version": "6.26.0",
84 + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
85 + "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
86 + "requires": {
87 + "core-js": "^2.4.0",
88 + "regenerator-runtime": "^0.11.0"
89 + }
90 + },
91 + "babel-types": {
92 + "version": "6.26.0",
93 + "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
94 + "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
95 + "requires": {
96 + "babel-runtime": "^6.26.0",
97 + "esutils": "^2.0.2",
98 + "lodash": "^4.17.4",
99 + "to-fast-properties": "^1.0.3"
100 + }
101 + },
102 + "babylon": {
103 + "version": "6.18.0",
104 + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
105 + "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
106 + },
107 + "basic-auth": {
108 + "version": "2.0.1",
109 + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
110 + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
111 + "requires": {
112 + "safe-buffer": "5.1.2"
113 + }
114 + },
115 + "body-parser": {
116 + "version": "1.18.3",
117 + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz",
118 + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=",
119 + "requires": {
120 + "bytes": "3.0.0",
121 + "content-type": "~1.0.4",
122 + "debug": "2.6.9",
123 + "depd": "~1.1.2",
124 + "http-errors": "~1.6.3",
125 + "iconv-lite": "0.4.23",
126 + "on-finished": "~2.3.0",
127 + "qs": "6.5.2",
128 + "raw-body": "2.3.3",
129 + "type-is": "~1.6.16"
130 + }
131 + },
132 + "bytes": {
133 + "version": "3.0.0",
134 + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
135 + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
136 + },
137 + "camelcase": {
138 + "version": "1.2.1",
139 + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
140 + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk="
141 + },
142 + "center-align": {
143 + "version": "0.1.3",
144 + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
145 + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
146 + "requires": {
147 + "align-text": "^0.1.3",
148 + "lazy-cache": "^1.0.3"
149 + }
150 + },
151 + "character-parser": {
152 + "version": "2.2.0",
153 + "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz",
154 + "integrity": "sha1-x84o821LzZdE5f/CxfzeHHMmH8A=",
155 + "requires": {
156 + "is-regex": "^1.0.3"
157 + }
158 + },
159 + "clean-css": {
160 + "version": "3.4.28",
161 + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz",
162 + "integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=",
163 + "requires": {
164 + "commander": "2.8.x",
165 + "source-map": "0.4.x"
166 + }
167 + },
168 + "cliui": {
169 + "version": "2.1.0",
170 + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
171 + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
172 + "requires": {
173 + "center-align": "^0.1.1",
174 + "right-align": "^0.1.1",
175 + "wordwrap": "0.0.2"
176 + }
177 + },
178 + "commander": {
179 + "version": "2.8.1",
180 + "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
181 + "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=",
182 + "requires": {
183 + "graceful-readlink": ">= 1.0.0"
184 + }
185 + },
186 + "constantinople": {
187 + "version": "3.1.2",
188 + "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz",
189 + "integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==",
190 + "requires": {
191 + "@types/babel-types": "^7.0.0",
192 + "@types/babylon": "^6.16.2",
193 + "babel-types": "^6.26.0",
194 + "babylon": "^6.18.0"
195 + }
196 + },
197 + "content-disposition": {
198 + "version": "0.5.2",
199 + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz",
200 + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ="
201 + },
202 + "content-type": {
203 + "version": "1.0.4",
204 + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
205 + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
206 + },
207 + "cookie": {
208 + "version": "0.4.0",
209 + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
210 + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
211 + },
212 + "cookie-parser": {
213 + "version": "1.4.5",
214 + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.5.tgz",
215 + "integrity": "sha512-f13bPUj/gG/5mDr+xLmSxxDsB9DQiTIfhJS/sqjrmfAWiAN+x2O4i/XguTL9yDZ+/IFDanJ+5x7hC4CXT9Tdzw==",
216 + "requires": {
217 + "cookie": "0.4.0",
218 + "cookie-signature": "1.0.6"
219 + }
220 + },
221 + "cookie-signature": {
222 + "version": "1.0.6",
223 + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
224 + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
225 + },
226 + "core-js": {
227 + "version": "2.6.11",
228 + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
229 + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg=="
230 + },
231 + "debug": {
232 + "version": "2.6.9",
233 + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
234 + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
235 + "requires": {
236 + "ms": "2.0.0"
237 + }
238 + },
239 + "decamelize": {
240 + "version": "1.2.0",
241 + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
242 + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
243 + },
244 + "depd": {
245 + "version": "1.1.2",
246 + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
247 + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
248 + },
249 + "destroy": {
250 + "version": "1.0.4",
251 + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
252 + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
253 + },
254 + "doctypes": {
255 + "version": "1.1.0",
256 + "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz",
257 + "integrity": "sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk="
258 + },
259 + "ee-first": {
260 + "version": "1.1.1",
261 + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
262 + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
263 + },
264 + "encodeurl": {
265 + "version": "1.0.2",
266 + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
267 + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
268 + },
269 + "escape-html": {
270 + "version": "1.0.3",
271 + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
272 + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
273 + },
274 + "esutils": {
275 + "version": "2.0.3",
276 + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
277 + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="
278 + },
279 + "etag": {
280 + "version": "1.8.1",
281 + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
282 + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
283 + },
284 + "express": {
285 + "version": "4.16.4",
286 + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz",
287 + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==",
288 + "requires": {
289 + "accepts": "~1.3.5",
290 + "array-flatten": "1.1.1",
291 + "body-parser": "1.18.3",
292 + "content-disposition": "0.5.2",
293 + "content-type": "~1.0.4",
294 + "cookie": "0.3.1",
295 + "cookie-signature": "1.0.6",
296 + "debug": "2.6.9",
297 + "depd": "~1.1.2",
298 + "encodeurl": "~1.0.2",
299 + "escape-html": "~1.0.3",
300 + "etag": "~1.8.1",
301 + "finalhandler": "1.1.1",
302 + "fresh": "0.5.2",
303 + "merge-descriptors": "1.0.1",
304 + "methods": "~1.1.2",
305 + "on-finished": "~2.3.0",
306 + "parseurl": "~1.3.2",
307 + "path-to-regexp": "0.1.7",
308 + "proxy-addr": "~2.0.4",
309 + "qs": "6.5.2",
310 + "range-parser": "~1.2.0",
311 + "safe-buffer": "5.1.2",
312 + "send": "0.16.2",
313 + "serve-static": "1.13.2",
314 + "setprototypeof": "1.1.0",
315 + "statuses": "~1.4.0",
316 + "type-is": "~1.6.16",
317 + "utils-merge": "1.0.1",
318 + "vary": "~1.1.2"
319 + },
320 + "dependencies": {
321 + "cookie": {
322 + "version": "0.3.1",
323 + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
324 + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
325 + }
326 + }
327 + },
328 + "finalhandler": {
329 + "version": "1.1.1",
330 + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz",
331 + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==",
332 + "requires": {
333 + "debug": "2.6.9",
334 + "encodeurl": "~1.0.2",
335 + "escape-html": "~1.0.3",
336 + "on-finished": "~2.3.0",
337 + "parseurl": "~1.3.2",
338 + "statuses": "~1.4.0",
339 + "unpipe": "~1.0.0"
340 + }
341 + },
342 + "follow-redirects": {
343 + "version": "1.5.10",
344 + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
345 + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
346 + "requires": {
347 + "debug": "=3.1.0"
348 + },
349 + "dependencies": {
350 + "debug": {
351 + "version": "3.1.0",
352 + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
353 + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
354 + "requires": {
355 + "ms": "2.0.0"
356 + }
357 + }
358 + }
359 + },
360 + "forwarded": {
361 + "version": "0.1.2",
362 + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
363 + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
364 + },
365 + "fresh": {
366 + "version": "0.5.2",
367 + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
368 + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
369 + },
370 + "graceful-readlink": {
371 + "version": "1.0.1",
372 + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
373 + "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
374 + },
375 + "has-symbols": {
376 + "version": "1.0.1",
377 + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
378 + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
379 + },
380 + "http-errors": {
381 + "version": "1.6.3",
382 + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
383 + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
384 + "requires": {
385 + "depd": "~1.1.2",
386 + "inherits": "2.0.3",
387 + "setprototypeof": "1.1.0",
388 + "statuses": ">= 1.4.0 < 2"
389 + }
390 + },
391 + "iconv-lite": {
392 + "version": "0.4.23",
393 + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
394 + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
395 + "requires": {
396 + "safer-buffer": ">= 2.1.2 < 3"
397 + }
398 + },
399 + "inherits": {
400 + "version": "2.0.3",
401 + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
402 + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
403 + },
404 + "ipaddr.js": {
405 + "version": "1.9.1",
406 + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
407 + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
408 + },
409 + "is-buffer": {
410 + "version": "1.1.6",
411 + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
412 + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
413 + },
414 + "is-expression": {
415 + "version": "3.0.0",
416 + "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-3.0.0.tgz",
417 + "integrity": "sha1-Oayqa+f9HzRx3ELHQW5hwkMXrJ8=",
418 + "requires": {
419 + "acorn": "~4.0.2",
420 + "object-assign": "^4.0.1"
421 + },
422 + "dependencies": {
423 + "acorn": {
424 + "version": "4.0.13",
425 + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
426 + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c="
427 + }
428 + }
429 + },
430 + "is-promise": {
431 + "version": "2.2.2",
432 + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
433 + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
434 + },
435 + "is-regex": {
436 + "version": "1.1.0",
437 + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz",
438 + "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==",
439 + "requires": {
440 + "has-symbols": "^1.0.1"
441 + }
442 + },
443 + "js-stringify": {
444 + "version": "1.0.2",
445 + "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz",
446 + "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds="
447 + },
448 + "jstransformer": {
449 + "version": "1.0.0",
450 + "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz",
451 + "integrity": "sha1-7Yvwkh4vPx7U1cGkT2hwntJHIsM=",
452 + "requires": {
453 + "is-promise": "^2.0.0",
454 + "promise": "^7.0.1"
455 + }
456 + },
457 + "kind-of": {
458 + "version": "3.2.2",
459 + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
460 + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
461 + "requires": {
462 + "is-buffer": "^1.1.5"
463 + }
464 + },
465 + "lazy-cache": {
466 + "version": "1.0.4",
467 + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
468 + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4="
469 + },
470 + "lodash": {
471 + "version": "4.17.15",
472 + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
473 + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
474 + },
475 + "longest": {
476 + "version": "1.0.1",
477 + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
478 + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
479 + },
480 + "media-typer": {
481 + "version": "0.3.0",
482 + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
483 + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
484 + },
485 + "merge-descriptors": {
486 + "version": "1.0.1",
487 + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
488 + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
489 + },
490 + "methods": {
491 + "version": "1.1.2",
492 + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
493 + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
494 + },
495 + "mime": {
496 + "version": "1.4.1",
497 + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
498 + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
499 + },
500 + "mime-db": {
501 + "version": "1.44.0",
502 + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
503 + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg=="
504 + },
505 + "mime-types": {
506 + "version": "2.1.27",
507 + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
508 + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
509 + "requires": {
510 + "mime-db": "1.44.0"
511 + }
512 + },
513 + "morgan": {
514 + "version": "1.9.1",
515 + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz",
516 + "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==",
517 + "requires": {
518 + "basic-auth": "~2.0.0",
519 + "debug": "2.6.9",
520 + "depd": "~1.1.2",
521 + "on-finished": "~2.3.0",
522 + "on-headers": "~1.0.1"
523 + }
524 + },
525 + "ms": {
526 + "version": "2.0.0",
527 + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
528 + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
529 + },
530 + "negotiator": {
531 + "version": "0.6.2",
532 + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
533 + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
534 + },
535 + "object-assign": {
536 + "version": "4.1.1",
537 + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
538 + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
539 + },
540 + "on-finished": {
541 + "version": "2.3.0",
542 + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
543 + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
544 + "requires": {
545 + "ee-first": "1.1.1"
546 + }
547 + },
548 + "on-headers": {
549 + "version": "1.0.2",
550 + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
551 + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA=="
552 + },
553 + "parseurl": {
554 + "version": "1.3.3",
555 + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
556 + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
557 + },
558 + "path-parse": {
559 + "version": "1.0.6",
560 + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
561 + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
562 + },
563 + "path-to-regexp": {
564 + "version": "0.1.7",
565 + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
566 + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
567 + },
568 + "promise": {
569 + "version": "7.3.1",
570 + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
571 + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
572 + "requires": {
573 + "asap": "~2.0.3"
574 + }
575 + },
576 + "proxy-addr": {
577 + "version": "2.0.6",
578 + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
579 + "integrity": "sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==",
580 + "requires": {
581 + "forwarded": "~0.1.2",
582 + "ipaddr.js": "1.9.1"
583 + }
584 + },
585 + "pug": {
586 + "version": "2.0.0-beta11",
587 + "resolved": "https://registry.npmjs.org/pug/-/pug-2.0.0-beta11.tgz",
588 + "integrity": "sha1-Favmr1AEx+LPRhPksnRlyVRrXwE=",
589 + "requires": {
590 + "pug-code-gen": "^1.1.1",
591 + "pug-filters": "^2.1.1",
592 + "pug-lexer": "^3.0.0",
593 + "pug-linker": "^2.0.2",
594 + "pug-load": "^2.0.5",
595 + "pug-parser": "^2.0.2",
596 + "pug-runtime": "^2.0.3",
597 + "pug-strip-comments": "^1.0.2"
598 + }
599 + },
600 + "pug-attrs": {
601 + "version": "2.0.4",
602 + "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-2.0.4.tgz",
603 + "integrity": "sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==",
604 + "requires": {
605 + "constantinople": "^3.0.1",
606 + "js-stringify": "^1.0.1",
607 + "pug-runtime": "^2.0.5"
608 + }
609 + },
610 + "pug-code-gen": {
611 + "version": "1.1.1",
612 + "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-1.1.1.tgz",
613 + "integrity": "sha1-HPcnRO8qA56uajNAyqoRBYcSWOg=",
614 + "requires": {
615 + "constantinople": "^3.0.1",
616 + "doctypes": "^1.1.0",
617 + "js-stringify": "^1.0.1",
618 + "pug-attrs": "^2.0.2",
619 + "pug-error": "^1.3.2",
620 + "pug-runtime": "^2.0.3",
621 + "void-elements": "^2.0.1",
622 + "with": "^5.0.0"
623 + }
624 + },
625 + "pug-error": {
626 + "version": "1.3.3",
627 + "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz",
628 + "integrity": "sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ=="
629 + },
630 + "pug-filters": {
631 + "version": "2.1.5",
632 + "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-2.1.5.tgz",
633 + "integrity": "sha512-xkw71KtrC4sxleKiq+cUlQzsiLn8pM5+vCgkChW2E6oNOzaqTSIBKIQ5cl4oheuDzvJYCTSYzRaVinMUrV4YLQ==",
634 + "requires": {
635 + "clean-css": "^3.3.0",
636 + "constantinople": "^3.0.1",
637 + "jstransformer": "1.0.0",
638 + "pug-error": "^1.3.2",
639 + "pug-walk": "^1.1.5",
640 + "resolve": "^1.1.6",
641 + "uglify-js": "^2.6.1"
642 + }
643 + },
644 + "pug-lexer": {
645 + "version": "3.1.0",
646 + "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-3.1.0.tgz",
647 + "integrity": "sha1-/QhzdtSmdbT1n4/vQiiDQ06VgaI=",
648 + "requires": {
649 + "character-parser": "^2.1.1",
650 + "is-expression": "^3.0.0",
651 + "pug-error": "^1.3.2"
652 + }
653 + },
654 + "pug-linker": {
655 + "version": "2.0.3",
656 + "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-2.0.3.tgz",
657 + "integrity": "sha1-szH/olc33eacEntWwQ/xf652bco=",
658 + "requires": {
659 + "pug-error": "^1.3.2",
660 + "pug-walk": "^1.1.2"
661 + }
662 + },
663 + "pug-load": {
664 + "version": "2.0.12",
665 + "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-2.0.12.tgz",
666 + "integrity": "sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg==",
667 + "requires": {
668 + "object-assign": "^4.1.0",
669 + "pug-walk": "^1.1.8"
670 + }
671 + },
672 + "pug-parser": {
673 + "version": "2.0.2",
674 + "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-2.0.2.tgz",
675 + "integrity": "sha1-U6aAz9BQOdywwn0CkJS8SnkmibA=",
676 + "requires": {
677 + "pug-error": "^1.3.2",
678 + "token-stream": "0.0.1"
679 + }
680 + },
681 + "pug-runtime": {
682 + "version": "2.0.5",
683 + "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz",
684 + "integrity": "sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw=="
685 + },
686 + "pug-strip-comments": {
687 + "version": "1.0.4",
688 + "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz",
689 + "integrity": "sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw==",
690 + "requires": {
691 + "pug-error": "^1.3.3"
692 + }
693 + },
694 + "pug-walk": {
695 + "version": "1.1.8",
696 + "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz",
697 + "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA=="
698 + },
699 + "qs": {
700 + "version": "6.5.2",
701 + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
702 + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA=="
703 + },
704 + "range-parser": {
705 + "version": "1.2.1",
706 + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
707 + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
708 + },
709 + "raw-body": {
710 + "version": "2.3.3",
711 + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz",
712 + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==",
713 + "requires": {
714 + "bytes": "3.0.0",
715 + "http-errors": "1.6.3",
716 + "iconv-lite": "0.4.23",
717 + "unpipe": "1.0.0"
718 + }
719 + },
720 + "regenerator-runtime": {
721 + "version": "0.11.1",
722 + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
723 + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg=="
724 + },
725 + "repeat-string": {
726 + "version": "1.6.1",
727 + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
728 + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
729 + },
730 + "resolve": {
731 + "version": "1.17.0",
732 + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
733 + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
734 + "requires": {
735 + "path-parse": "^1.0.6"
736 + }
737 + },
738 + "right-align": {
739 + "version": "0.1.3",
740 + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
741 + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
742 + "requires": {
743 + "align-text": "^0.1.1"
744 + }
745 + },
746 + "safe-buffer": {
747 + "version": "5.1.2",
748 + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
749 + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
750 + },
751 + "safer-buffer": {
752 + "version": "2.1.2",
753 + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
754 + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
755 + },
756 + "send": {
757 + "version": "0.16.2",
758 + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
759 + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==",
760 + "requires": {
761 + "debug": "2.6.9",
762 + "depd": "~1.1.2",
763 + "destroy": "~1.0.4",
764 + "encodeurl": "~1.0.2",
765 + "escape-html": "~1.0.3",
766 + "etag": "~1.8.1",
767 + "fresh": "0.5.2",
768 + "http-errors": "~1.6.2",
769 + "mime": "1.4.1",
770 + "ms": "2.0.0",
771 + "on-finished": "~2.3.0",
772 + "range-parser": "~1.2.0",
773 + "statuses": "~1.4.0"
774 + }
775 + },
776 + "serve-static": {
777 + "version": "1.13.2",
778 + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz",
779 + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==",
780 + "requires": {
781 + "encodeurl": "~1.0.2",
782 + "escape-html": "~1.0.3",
783 + "parseurl": "~1.3.2",
784 + "send": "0.16.2"
785 + }
786 + },
787 + "setprototypeof": {
788 + "version": "1.1.0",
789 + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
790 + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
791 + },
792 + "source-map": {
793 + "version": "0.4.4",
794 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
795 + "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
796 + "requires": {
797 + "amdefine": ">=0.0.4"
798 + }
799 + },
800 + "statuses": {
801 + "version": "1.4.0",
802 + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
803 + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
804 + },
805 + "to-fast-properties": {
806 + "version": "1.0.3",
807 + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
808 + "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
809 + },
810 + "token-stream": {
811 + "version": "0.0.1",
812 + "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz",
813 + "integrity": "sha1-zu78cXp2xDFvEm0LnbqlXX598Bo="
814 + },
815 + "type-is": {
816 + "version": "1.6.18",
817 + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
818 + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
819 + "requires": {
820 + "media-typer": "0.3.0",
821 + "mime-types": "~2.1.24"
822 + }
823 + },
824 + "uglify-js": {
825 + "version": "2.8.29",
826 + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
827 + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
828 + "requires": {
829 + "source-map": "~0.5.1",
830 + "uglify-to-browserify": "~1.0.0",
831 + "yargs": "~3.10.0"
832 + },
833 + "dependencies": {
834 + "source-map": {
835 + "version": "0.5.7",
836 + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
837 + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
838 + }
839 + }
840 + },
841 + "uglify-to-browserify": {
842 + "version": "1.0.2",
843 + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
844 + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
845 + "optional": true
846 + },
847 + "unpipe": {
848 + "version": "1.0.0",
849 + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
850 + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
851 + },
852 + "utils-merge": {
853 + "version": "1.0.1",
854 + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
855 + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
856 + },
857 + "vary": {
858 + "version": "1.1.2",
859 + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
860 + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
861 + },
862 + "void-elements": {
863 + "version": "2.0.1",
864 + "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz",
865 + "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w="
866 + },
867 + "window-size": {
868 + "version": "0.1.0",
869 + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
870 + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
871 + },
872 + "with": {
873 + "version": "5.1.1",
874 + "resolved": "https://registry.npmjs.org/with/-/with-5.1.1.tgz",
875 + "integrity": "sha1-+k2qktrzLE6pTtRTyB8EaGtXXf4=",
876 + "requires": {
877 + "acorn": "^3.1.0",
878 + "acorn-globals": "^3.0.0"
879 + }
880 + },
881 + "wordwrap": {
882 + "version": "0.0.2",
883 + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
884 + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
885 + },
886 + "yargs": {
887 + "version": "3.10.0",
888 + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
889 + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
890 + "requires": {
891 + "camelcase": "^1.0.2",
892 + "cliui": "^2.1.0",
893 + "decamelize": "^1.0.0",
894 + "window-size": "0.1.0"
895 + }
896 + }
897 + }
898 +}
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
6 "start": "node ./bin/www" 6 "start": "node ./bin/www"
7 }, 7 },
8 "dependencies": { 8 "dependencies": {
9 + "axios": "^0.19.2",
9 "cookie-parser": "~1.4.3", 10 "cookie-parser": "~1.4.3",
10 "debug": "~2.6.9", 11 "debug": "~2.6.9",
11 "express": "~4.16.0", 12 "express": "~4.16.0",
......
1 +var express = require("express");
2 +var router = express.Router();
3 +var axios = require("axios");
4 +
5 +const openAPIKey = require("./secrets.json").openAPIKey;
6 +const googleMapKey = require("./secrets.json").googleAPIKey;
7 +
8 +axios.create({
9 + // TODO : 웹을 AWS에 올릴때, 해당 baseURL이 달라져야할 수 있음
10 + baseURL: "http://localhost:3000",
11 + responseType: "json",
12 +});
13 +
14 +/* GET airCondition listing. */
15 +router.get("/", async function (req, res, next) {
16 + console.log("경도:", req.query.latitude);
17 + console.log("경도:", req.query.longitude);
18 + let airCondition = "";
19 + let response = await getPosition(req.query.latitude, req.query.longitude)
20 + .then((encodedStation) => getCondition(encodedStation))
21 + .then((result) => {
22 + airCondition = result;
23 + });
24 +
25 + res.send(airCondition);
26 +});
27 +
28 +const getPosition = (lat, lon) => {
29 + return axios
30 + .get(
31 + "https://maps.googleapis.com/maps/api/geocode/json?latlng=" +
32 + lat +
33 + "," +
34 + lon +
35 + "&location_type=ROOFTOP&result_type=street_address&key=" +
36 + googleMapKey +
37 + "&language=ko"
38 + )
39 + .then(function (response) {
40 + console.log("KEY : ", googleMapKey);
41 + let stationName = "";
42 + for (
43 + let i = 0;
44 + i < response["data"].results[0]["address_components"].length;
45 + i++
46 + ) {
47 + let temp =
48 + response["data"].results[0]["address_components"][i]["long_name"];
49 + if (temp[temp.length - 1] == "구") {
50 + stationName = temp;
51 + break;
52 + }
53 + }
54 + console.log("STATION : ", stationName);
55 + return (encodedStation = encodeURI(stationName));
56 + })
57 + .catch(function (error) {
58 + console.log(error.response);
59 + });
60 +};
61 +
62 +const getCondition = (encodedStation) => {
63 + return axios
64 + .get(
65 + "http://openapi.airkorea.or.kr/openapi/services/rest/ArpltnInforInqireSvc/getMsrstnAcctoRltmMesureDnsty?serviceKey=" +
66 + openAPIKey +
67 + "&numOfRows=10&pageNo=1&stationName=" +
68 + encodedStation +
69 + "&dataTerm=DAILY&ver=1.3&_returnType=json"
70 + )
71 + .then(function (response) {
72 + // console.log("RES :: ", response);
73 + result = response["data"]["list"][0];
74 + return result;
75 + })
76 + .catch(function (error) {
77 + console.log(error.response);
78 + });
79 +};
80 +
81 +module.exports = router;
1 -var express = require('express'); 1 +var express = require("express");
2 var router = express.Router(); 2 var router = express.Router();
3 3
4 /* GET home page. */ 4 /* GET home page. */
5 -router.get('/', function(req, res, next) { 5 +router.get("/", function (req, res, next) {
6 - res.render('index', { title: 'Express' }); 6 + res.render("index", { title: "Express" });
7 }); 7 });
8 8
9 module.exports = router; 9 module.exports = router;
......
...@@ -3,3 +3,4 @@ extends layout ...@@ -3,3 +3,4 @@ extends layout
3 block content 3 block content
4 h1= title 4 h1= title
5 p Welcome to #{title} 5 p Welcome to #{title}
6 + p This is HowsTheWeather Backend
......