Showing
6 changed files
with
49 additions
and
0 deletions
... | @@ -371,6 +371,11 @@ | ... | @@ -371,6 +371,11 @@ |
371 | "node": ">= 0.6" | 371 | "node": ">= 0.6" |
372 | } | 372 | } |
373 | }, | 373 | }, |
374 | + "node_modules/fs": { | ||
375 | + "version": "0.0.1-security", | ||
376 | + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", | ||
377 | + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" | ||
378 | + }, | ||
374 | "node_modules/function-bind": { | 379 | "node_modules/function-bind": { |
375 | "version": "1.1.1", | 380 | "version": "1.1.1", |
376 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", | 381 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", | ... | ... |
node_modules/fs/README.md
0 → 100644
1 | +# Security holding package | ||
2 | + | ||
3 | +This package name is not currently in use, but was formerly occupied | ||
4 | +by another package. To avoid malicious use, npm is hanging on to the | ||
5 | +package name, but loosely, and we'll probably give it to you if you | ||
6 | +want it. | ||
7 | + | ||
8 | +You may adopt this package by contacting support@npmjs.com and | ||
9 | +requesting the name. |
node_modules/fs/package.json
0 → 100644
1 | +{ | ||
2 | + "name": "fs", | ||
3 | + "version": "0.0.1-security", | ||
4 | + "description": "", | ||
5 | + "main": "index.js", | ||
6 | + "scripts": { | ||
7 | + "test": "echo \"Error: no test specified\" && exit 1" | ||
8 | + }, | ||
9 | + "repository": { | ||
10 | + "type": "git", | ||
11 | + "url": "git+https://github.com/npm/security-holder.git" | ||
12 | + }, | ||
13 | + "keywords": [], | ||
14 | + "author": "", | ||
15 | + "license": "ISC", | ||
16 | + "bugs": { | ||
17 | + "url": "https://github.com/npm/security-holder/issues" | ||
18 | + }, | ||
19 | + "homepage": "https://github.com/npm/security-holder#readme" | ||
20 | +} |
... | @@ -10,6 +10,7 @@ | ... | @@ -10,6 +10,7 @@ |
10 | "license": "ISC", | 10 | "license": "ISC", |
11 | "dependencies": { | 11 | "dependencies": { |
12 | "express": "^4.18.1", | 12 | "express": "^4.18.1", |
13 | + "fs": "^0.0.1-security", | ||
13 | "request": "^2.88.2", | 14 | "request": "^2.88.2", |
14 | "xml-js": "^1.6.11" | 15 | "xml-js": "^1.6.11" |
15 | } | 16 | } |
... | @@ -381,6 +382,11 @@ | ... | @@ -381,6 +382,11 @@ |
381 | "node": ">= 0.6" | 382 | "node": ">= 0.6" |
382 | } | 383 | } |
383 | }, | 384 | }, |
385 | + "node_modules/fs": { | ||
386 | + "version": "0.0.1-security", | ||
387 | + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", | ||
388 | + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" | ||
389 | + }, | ||
384 | "node_modules/function-bind": { | 390 | "node_modules/function-bind": { |
385 | "version": "1.1.1", | 391 | "version": "1.1.1", |
386 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", | 392 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", |
... | @@ -1284,6 +1290,11 @@ | ... | @@ -1284,6 +1290,11 @@ |
1284 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", | 1290 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", |
1285 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" | 1291 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" |
1286 | }, | 1292 | }, |
1293 | + "fs": { | ||
1294 | + "version": "0.0.1-security", | ||
1295 | + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", | ||
1296 | + "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ=" | ||
1297 | + }, | ||
1287 | "function-bind": { | 1298 | "function-bind": { |
1288 | "version": "1.1.1", | 1299 | "version": "1.1.1", |
1289 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", | 1300 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", | ... | ... |
... | @@ -15,6 +15,7 @@ | ... | @@ -15,6 +15,7 @@ |
15 | "license": "ISC", | 15 | "license": "ISC", |
16 | "dependencies": { | 16 | "dependencies": { |
17 | "express": "^4.18.1", | 17 | "express": "^4.18.1", |
18 | + "fs": "^0.0.1-security", | ||
18 | "request": "^2.88.2", | 19 | "request": "^2.88.2", |
19 | "xml-js": "^1.6.11" | 20 | "xml-js": "^1.6.11" |
20 | } | 21 | } | ... | ... |
... | @@ -2,6 +2,7 @@ const express = require("express"); | ... | @@ -2,6 +2,7 @@ const express = require("express"); |
2 | const app = express(); | 2 | const app = express(); |
3 | const request = require("request"); | 3 | const request = require("request"); |
4 | const convert = require("xml-js"); | 4 | const convert = require("xml-js"); |
5 | +const fs = require("fs"); | ||
5 | 6 | ||
6 | // http://apis.data.go.kr/B090041/openapi/service/SpcdeInfoService/getHoliDeInfo?solYear=2019&solMonth=03&ServiceKey=서비스키 | 7 | // http://apis.data.go.kr/B090041/openapi/service/SpcdeInfoService/getHoliDeInfo?solYear=2019&solMonth=03&ServiceKey=서비스키 |
7 | 8 | ||
... | @@ -25,9 +26,11 @@ app.get("/", function (req, res) { | ... | @@ -25,9 +26,11 @@ app.get("/", function (req, res) { |
25 | var result = body; | 26 | var result = body; |
26 | var xmlToJson = convert.xml2json(result, { compact: true, spaces: 4 }); | 27 | var xmlToJson = convert.xml2json(result, { compact: true, spaces: 4 }); |
27 | console.log(xmlToJson); | 28 | console.log(xmlToJson); |
29 | + fs.writeFileSync("holi.json", xmlToJson); | ||
28 | } | 30 | } |
29 | } | 31 | } |
30 | }); | 32 | }); |
33 | + res.send("OK"); | ||
31 | }); | 34 | }); |
32 | 35 | ||
33 | const port = 8080; | 36 | const port = 8080; | ... | ... |
-
Please register or login to post a comment