Showing
4 changed files
with
24 additions
and
2 deletions
... | @@ -13,6 +13,7 @@ | ... | @@ -13,6 +13,7 @@ |
13 | "@testing-library/user-event": "^13.5.0", | 13 | "@testing-library/user-event": "^13.5.0", |
14 | "axios": "^0.27.2", | 14 | "axios": "^0.27.2", |
15 | "express": "^4.18.1", | 15 | "express": "^4.18.1", |
16 | + "fs": "^0.0.1-security", | ||
16 | "localforage": "^1.10.0", | 17 | "localforage": "^1.10.0", |
17 | "puppeteer": "^14.1.1", | 18 | "puppeteer": "^14.1.1", |
18 | "react": "^18.1.0", | 19 | "react": "^18.1.0", |
... | @@ -7888,6 +7889,11 @@ | ... | @@ -7888,6 +7889,11 @@ |
7888 | "node": ">= 0.6" | 7889 | "node": ">= 0.6" |
7889 | } | 7890 | } |
7890 | }, | 7891 | }, |
7892 | + "node_modules/fs": { | ||
7893 | + "version": "0.0.1-security", | ||
7894 | + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", | ||
7895 | + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" | ||
7896 | + }, | ||
7891 | "node_modules/fs-constants": { | 7897 | "node_modules/fs-constants": { |
7892 | "version": "1.0.0", | 7898 | "version": "1.0.0", |
7893 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", | 7899 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", |
... | @@ -22268,6 +22274,11 @@ | ... | @@ -22268,6 +22274,11 @@ |
22268 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", | 22274 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", |
22269 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" | 22275 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" |
22270 | }, | 22276 | }, |
22277 | + "fs": { | ||
22278 | + "version": "0.0.1-security", | ||
22279 | + "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz", | ||
22280 | + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" | ||
22281 | + }, | ||
22271 | "fs-constants": { | 22282 | "fs-constants": { |
22272 | "version": "1.0.0", | 22283 | "version": "1.0.0", |
22273 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", | 22284 | "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", | ... | ... |
... | @@ -8,6 +8,7 @@ | ... | @@ -8,6 +8,7 @@ |
8 | "@testing-library/user-event": "^13.5.0", | 8 | "@testing-library/user-event": "^13.5.0", |
9 | "axios": "^0.27.2", | 9 | "axios": "^0.27.2", |
10 | "express": "^4.18.1", | 10 | "express": "^4.18.1", |
11 | + "fs": "^0.0.1-security", | ||
11 | "localforage": "^1.10.0", | 12 | "localforage": "^1.10.0", |
12 | "puppeteer": "^14.1.1", | 13 | "puppeteer": "^14.1.1", |
13 | "react": "^18.1.0", | 14 | "react": "^18.1.0", | ... | ... |
1 | import express from "express"; | 1 | import express from "express"; |
2 | import { login } from "./libs/E_Campus.js"; | 2 | import { login } from "./libs/E_Campus.js"; |
3 | +import fs from "fs"; | ||
4 | + | ||
3 | const app = express(); | 5 | const app = express(); |
4 | const router = express.Router(); | 6 | const router = express.Router(); |
5 | 7 | ||
... | @@ -11,8 +13,15 @@ router.get("/", (req, res) => { | ... | @@ -11,8 +13,15 @@ router.get("/", (req, res) => { |
11 | 13 | ||
12 | app.use("/", router); | 14 | app.use("/", router); |
13 | 15 | ||
14 | -login("asdf", "asdf!"); | 16 | +fs.readFile("server/login.pvdata", "utf8", (err, data) => { |
17 | + if (err) { | ||
18 | + console.error(err); | ||
19 | + console.log("server/login.pvdata에 ID\\nPW를 작성"); | ||
20 | + return; | ||
21 | + } | ||
22 | + login(...data.split("\r\n")); | ||
15 | 23 | ||
16 | -app.listen(3001, function () { | 24 | + app.listen(3001, function () { |
17 | console.log("listening on 3001"); | 25 | console.log("listening on 3001"); |
26 | + }); | ||
18 | }); | 27 | }); | ... | ... |
-
Please register or login to post a comment