박지환

Hide authentication key

node_modules/
package-lock.json
\ No newline at end of file
package-lock.json
.env
\ No newline at end of file
......
......@@ -14,6 +14,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"dotenv": "^16.0.1",
"ejs": "^3.1.8",
"express": "^4.18.1",
"request": "^2.88.2",
......
......@@ -3,6 +3,7 @@ const app = express();
const request = require("request");
const xml2js = require("xml2js");
const static = require("serve-static");
require("dotenv").config();
// Modify the values as needed
var year = "2022";
......@@ -10,8 +11,7 @@ var month = "09";
var operation = "getRestDeInfo";
// Do not modify the values
var SERVEICE_KEY =
"qBtJy2Prw8CCnAiijUM7VkuaA9MZozHuiQI4FbEGYdUDPz4%2FM%2FuxegGjNBWK0aWQHvSslVHwIZQwNWh57WgRTA%3D%3D";
var SERVEICE_KEY = process.env.API_KEY;
var url = "http://apis.data.go.kr/B090041/openapi/service/SpcdeInfoService/";
var queryParams = "?" + "solYear" + "=" + year;
queryParams += "&" + "solMonth" + "=" + month;
......