HyeonJun Jeon

[Modify] Hide id/pw in file

......@@ -22,3 +22,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.prettierignore
server/libs/login.pvdata
......
......@@ -13,6 +13,7 @@
"@testing-library/user-event": "^13.5.0",
"axios": "^0.27.2",
"express": "^4.18.1",
"fs": "^0.0.1-security",
"localforage": "^1.10.0",
"puppeteer": "^14.1.1",
"react": "^18.1.0",
......@@ -7888,6 +7889,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": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
},
"node_modules/fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
......@@ -22268,6 +22274,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": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
},
"fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
......
......@@ -8,6 +8,7 @@
"@testing-library/user-event": "^13.5.0",
"axios": "^0.27.2",
"express": "^4.18.1",
"fs": "^0.0.1-security",
"localforage": "^1.10.0",
"puppeteer": "^14.1.1",
"react": "^18.1.0",
......
import express from "express";
import { login } from "./libs/E_Campus.js";
import fs from "fs";
const app = express();
const router = express.Router();
......@@ -11,8 +13,15 @@ router.get("/", (req, res) => {
app.use("/", router);
login("asdf", "asdf!");
fs.readFile("server/login.pvdata", "utf8", (err, data) => {
if (err) {
console.error(err);
console.log("server/login.pvdata에 ID\\nPW를 작성");
return;
}
login(...data.split("\r\n"));
app.listen(3001, function () {
app.listen(3001, function () {
console.log("listening on 3001");
});
});
......