Toggle navigation
Toggle navigation
This project
Loading...
Sign in
teamPARK
/
holiday-counter-recommend-activity
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박지환
2022-05-06 14:03:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7eaf3e0c5c4a10c69b98e70a6bd859eef05ac4be
7eaf3e0c
1 parent
13b00e04
Update get json file
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
0 deletions
node_modules/.package-lock.json
node_modules/fs/README.md
node_modules/fs/package.json
package-lock.json
package.json
server.js
node_modules/.package-lock.json
View file @
7eaf3e0
...
...
@@ -371,6 +371,11 @@
"node"
:
">= 0.6"
}
},
"node_modules/fs"
:
{
"version"
:
"0.0.1-security"
,
"resolved"
:
"https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz"
,
"integrity"
:
"sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
},
"node_modules/function-bind"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
,
...
...
node_modules/fs/README.md
0 → 100644
View file @
7eaf3e0
# Security holding package
This package name is not currently in use, but was formerly occupied
by another package. To avoid malicious use, npm is hanging on to the
package name, but loosely, and we'll probably give it to you if you
want it.
You may adopt this package by contacting support@npmjs.com and
requesting the name.
node_modules/fs/package.json
0 → 100644
View file @
7eaf3e0
{
"name"
:
"fs"
,
"version"
:
"0.0.1-security"
,
"description"
:
""
,
"main"
:
"index.js"
,
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
},
"repository"
:
{
"type"
:
"git"
,
"url"
:
"git+https://github.com/npm/security-holder.git"
},
"keywords"
:
[],
"author"
:
""
,
"license"
:
"ISC"
,
"bugs"
:
{
"url"
:
"https://github.com/npm/security-holder/issues"
},
"homepage"
:
"https://github.com/npm/security-holder#readme"
}
package-lock.json
View file @
7eaf3e0
...
...
@@ -10,6 +10,7 @@
"license"
:
"ISC"
,
"dependencies"
:
{
"express"
:
"^4.18.1"
,
"fs"
:
"^0.0.1-security"
,
"request"
:
"^2.88.2"
,
"xml-js"
:
"^1.6.11"
}
...
...
@@ -381,6 +382,11 @@
"node"
:
">= 0.6"
}
},
"node_modules/fs"
:
{
"version"
:
"0.0.1-security"
,
"resolved"
:
"https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz"
,
"integrity"
:
"sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
},
"node_modules/function-bind"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
,
...
...
@@ -1284,6 +1290,11 @@
"resolved"
:
"https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz"
,
"integrity"
:
"sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"fs"
:
{
"version"
:
"0.0.1-security"
,
"resolved"
:
"https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz"
,
"integrity"
:
"sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
},
"function-bind"
:
{
"version"
:
"1.1.1"
,
"resolved"
:
"https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
,
...
...
package.json
View file @
7eaf3e0
...
...
@@ -15,6 +15,7 @@
"license"
:
"ISC"
,
"dependencies"
:
{
"express"
:
"^4.18.1"
,
"fs"
:
"^0.0.1-security"
,
"request"
:
"^2.88.2"
,
"xml-js"
:
"^1.6.11"
}
...
...
server.js
View file @
7eaf3e0
...
...
@@ -2,6 +2,7 @@ const express = require("express");
const
app
=
express
();
const
request
=
require
(
"request"
);
const
convert
=
require
(
"xml-js"
);
const
fs
=
require
(
"fs"
);
// http://apis.data.go.kr/B090041/openapi/service/SpcdeInfoService/getHoliDeInfo?solYear=2019&solMonth=03&ServiceKey=서비스키
...
...
@@ -25,9 +26,11 @@ app.get("/", function (req, res) {
var
result
=
body
;
var
xmlToJson
=
convert
.
xml2json
(
result
,
{
compact
:
true
,
spaces
:
4
});
console
.
log
(
xmlToJson
);
fs
.
writeFileSync
(
"holi.json"
,
xmlToJson
);
}
}
});
res
.
send
(
"OK"
);
});
const
port
=
8080
;
...
...
Please
register
or
login
to post a comment