Showing
12 changed files
with
356 additions
and
7 deletions
.gitignore
0 → 100644
1 | +node_modules | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
app/database/Connection.js
0 → 100644
1 | +const mysql = require('mysql') | ||
2 | + | ||
3 | +var pool = mysql.createPool({ | ||
4 | + host: "localhost", | ||
5 | + user: "root", | ||
6 | + password: "1234", | ||
7 | + port: 3306, | ||
8 | + database: "rest_stop" | ||
9 | +}) | ||
10 | + | ||
11 | +var adduser = function(name, id, password, callback) { | ||
12 | + console.log('addUser'); | ||
13 | + | ||
14 | + pool.getConnection(function(err, conn) { | ||
15 | + if(err){ | ||
16 | + if(conn){ | ||
17 | + conn.release(); | ||
18 | + } | ||
19 | + | ||
20 | + callback(err, null); | ||
21 | + return; | ||
22 | + } | ||
23 | + | ||
24 | + var data = {name:name, id:id, password:password}; | ||
25 | + | ||
26 | + var exec = conn.query('insert into users set ?', data, function(err, result) { | ||
27 | + conn.release(); | ||
28 | + | ||
29 | + if(err){ | ||
30 | + console.log('SQL 실행 시 오류 발생'); | ||
31 | + console.dir(err); | ||
32 | + | ||
33 | + callback(err,null); | ||
34 | + | ||
35 | + return; | ||
36 | + } | ||
37 | + | ||
38 | + callback(null, result); | ||
39 | + }) | ||
40 | + }) | ||
41 | +} | ||
42 | + | ||
43 | +module.exports.pool = pool; | ||
44 | +//module.exports.login = login; | ||
45 | +module.exports.adduser = adduser; | ||
46 | +//module.exports.listuser = listuser; |
app/database/User.js
0 → 100644
1 | +const Connection = require('./Connection') | ||
2 | + | ||
3 | +var adduser = async (username,userId,userPassword) => { | ||
4 | + try { | ||
5 | + const query = `INSERT INTO ` + | ||
6 | + `accounts ` + | ||
7 | + `VALUES ` + | ||
8 | + `(null, '$(username)', '$(userId)', '$(userPassword)')` | ||
9 | + | ||
10 | + await Connection(query) | ||
11 | + | ||
12 | + return true; | ||
13 | + } catch (error) { | ||
14 | + return false; | ||
15 | + } | ||
16 | +}; | ||
17 | + | ||
18 | +var login; | ||
19 | + | ||
20 | +var listuser = function(req, res) { | ||
21 | + console.log('user(user2.js) 모듈 안에 있는 listuser 호출됨.'); | ||
22 | + | ||
23 | + // 데이터베이스 객체 참조 | ||
24 | + var database = req.app.get('database'); | ||
25 | + | ||
26 | + // 데이터베이스 객체가 초기화된 경우, 모델 객체의 findAll 메소드 호출 | ||
27 | + if (database.db) { | ||
28 | + // 1. 모든 사용자 검색 | ||
29 | + database.UserModel.findAll(function(err, results) { | ||
30 | + // 에러 발생 시, 클라이언트로 에러 전송 | ||
31 | + if (err) { | ||
32 | + console.error('사용자 리스트 조회 중 에러 발생 : ' + err.stack); | ||
33 | + | ||
34 | + res.writeHead('200', {'Content-Type':'text/html;charset=utf8'}); | ||
35 | + res.write('<h2>사용자 리스트 조회 중 에러 발생</h2>'); | ||
36 | + res.write('<p>' + err.stack + '</p>'); | ||
37 | + res.end(); | ||
38 | + | ||
39 | + return; | ||
40 | + } | ||
41 | + | ||
42 | + if (results) { | ||
43 | + console.dir(results); | ||
44 | + | ||
45 | + res.writeHead('200', {'Content-Type':'text/html;charset=utf8'}); | ||
46 | + res.write('<h2>사용자 리스트</h2>'); | ||
47 | + res.write('<div><ul>'); | ||
48 | + | ||
49 | + for (var i = 0; i < results.length; i++) { | ||
50 | + var curId = results[i]._doc.id; | ||
51 | + var curName = results[i]._doc.name; | ||
52 | + res.write(' <li>#' + i + ' : ' + curId + ', ' + curName + '</li>'); | ||
53 | + } | ||
54 | + | ||
55 | + res.write('</ul></div>'); | ||
56 | + res.end(); | ||
57 | + } else { | ||
58 | + res.writeHead('200', {'Content-Type':'text/html;charset=utf8'}); | ||
59 | + res.write('<h2>사용자 리스트 조회 실패</h2>'); | ||
60 | + res.end(); | ||
61 | + } | ||
62 | + }); | ||
63 | + } else { | ||
64 | + res.writeHead('200', {'Content-Type':'text/html;charset=utf8'}); | ||
65 | + res.write('<h2>데이터베이스 연결 실패</h2>'); | ||
66 | + res.end(); | ||
67 | + } | ||
68 | + | ||
69 | +}; | ||
70 | + | ||
71 | + | ||
72 | +//사용자를 인증하는 함수 : 아이디로 먼저 찾고 비밀번호를 그 다음에 비교하도록 함 | ||
73 | +var authUser = function(database, id, password, callback) { | ||
74 | + console.log('authUser 호출됨.'); | ||
75 | + | ||
76 | + // 1. 아이디를 이용해 검색 | ||
77 | + database.UserModel.findById(id, function(err, results) { | ||
78 | + if (err) { | ||
79 | + callback(err, null); | ||
80 | + return; | ||
81 | + } | ||
82 | + | ||
83 | + console.log('아이디 [%s]로 사용자 검색결과', id); | ||
84 | + console.dir(results); | ||
85 | + | ||
86 | + if (results.length > 0) { | ||
87 | + console.log('아이디와 일치하는 사용자 찾음.'); | ||
88 | + | ||
89 | + // 2. 패스워드 확인 : 모델 인스턴스를 객체를 만들고 authenticate() 메소드 호출 | ||
90 | + var user = new database.UserModel({id:id}); | ||
91 | + var authenticated = user.authenticate(password, results[0]._doc.salt, results[0]._doc.hashed_password); | ||
92 | + if (authenticated) { | ||
93 | + console.log('비밀번호 일치함'); | ||
94 | + callback(null, results); | ||
95 | + } else { | ||
96 | + console.log('비밀번호 일치하지 않음'); | ||
97 | + callback(null, null); | ||
98 | + } | ||
99 | + | ||
100 | + } else { | ||
101 | + console.log("아이디와 일치하는 사용자를 찾지 못함."); | ||
102 | + callback(null, null); | ||
103 | + } | ||
104 | + | ||
105 | + }); | ||
106 | + | ||
107 | +} | ||
108 | + | ||
109 | + | ||
110 | +//사용자를 등록하는 함수 | ||
111 | +var addUser = function(database, id, password, name, callback) { | ||
112 | + console.log('addUser 호출됨.'); | ||
113 | + | ||
114 | + // UserModel 인스턴스 생성 | ||
115 | + var user = new database.UserModel({"id":id, "password":password, "name":name}); | ||
116 | + | ||
117 | + // save()로 저장 | ||
118 | + user.save(function(err) { | ||
119 | + if (err) { | ||
120 | + callback(err, null); | ||
121 | + return; | ||
122 | + } | ||
123 | + | ||
124 | + console.log("사용자 데이터 추가함."); | ||
125 | + callback(null, user); | ||
126 | + | ||
127 | + }); | ||
128 | +} | ||
129 | + | ||
130 | + | ||
131 | +module.exports.login = login; | ||
132 | +module.exports.adduser = adduser; | ||
133 | +module.exports.listuser = listuser; | ||
134 | + |
... | @@ -60,7 +60,7 @@ | ... | @@ -60,7 +60,7 @@ |
60 | <div class="text-center my-5"> | 60 | <div class="text-center my-5"> |
61 | <h1>로그인</h1> | 61 | <h1>로그인</h1> |
62 | <br> | 62 | <br> |
63 | - <form method="post" action="/login/process"> | 63 | + <form method="post" action="/signup/process"> |
64 | <table> | 64 | <table> |
65 | <tr> | 65 | <tr> |
66 | <td><label>이름</label></td> | 66 | <td><label>이름</label></td> | ... | ... |
1 | var express = require('express') | 1 | var express = require('express') |
2 | +var User = require('../database/User') | ||
2 | var router = express.Router() | 3 | var router = express.Router() |
3 | 4 | ||
4 | //라우팅 함수 등록 | 5 | //라우팅 함수 등록 |
... | @@ -7,19 +8,30 @@ router.get('/',function(req,res){ | ... | @@ -7,19 +8,30 @@ router.get('/',function(req,res){ |
7 | res.render('login.html') | 8 | res.render('login.html') |
8 | }); | 9 | }); |
9 | 10 | ||
10 | -router.post('/process', function(req, res) { | 11 | +router.post('/process', async (req, res) => { |
11 | console.log('/process/login 처리함'); | 12 | console.log('/process/login 처리함'); |
12 | 13 | ||
13 | var paramId = req.body.id || req.query.id; | 14 | var paramId = req.body.id || req.query.id; |
14 | var paramPassword = req.body.password || req.query.password; | 15 | var paramPassword = req.body.password || req.query.password; |
15 | //GET, POST 모두 고려해서 둘 다 검사 | 16 | //GET, POST 모두 고려해서 둘 다 검사 |
16 | 17 | ||
18 | + const results = await User.login(paramId, paramPassword); | ||
19 | + | ||
20 | + if (results){ | ||
21 | + res.writeHead('200', { 'Content-Type': 'text/html;charset=utf8' }); | ||
22 | + res.write('<h1>로그인 성공</h1>'); | ||
23 | + res.write('<div><p>Param id : ' + paramId + '</p></div>'); | ||
24 | + res.write('<div><p>Param password : ' + paramPassword + '</p></div>'); | ||
25 | + res.write("<br><br><a href ='/login.html'>로그인 페이지로 돌아가기</a>"); | ||
26 | + res.end(); | ||
27 | + } else { | ||
17 | res.writeHead('200', { 'Content-Type': 'text/html;charset=utf8' }); | 28 | res.writeHead('200', { 'Content-Type': 'text/html;charset=utf8' }); |
18 | - res.write('<h1>Result form Express Server</h1>'); | 29 | + res.write('<h1>정보가 잘못되었습니다.</h1>'); |
19 | res.write('<div><p>Param id : ' + paramId + '</p></div>'); | 30 | res.write('<div><p>Param id : ' + paramId + '</p></div>'); |
20 | res.write('<div><p>Param password : ' + paramPassword + '</p></div>'); | 31 | res.write('<div><p>Param password : ' + paramPassword + '</p></div>'); |
21 | res.write("<br><br><a href ='/login.html'>로그인 페이지로 돌아가기</a>"); | 32 | res.write("<br><br><a href ='/login.html'>로그인 페이지로 돌아가기</a>"); |
22 | res.end(); | 33 | res.end(); |
34 | + } | ||
23 | }); | 35 | }); |
24 | 36 | ||
25 | module.exports = router | 37 | module.exports = router |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | var express = require('express') | 1 | var express = require('express') |
2 | +var Conn = require('../database/Connection') | ||
2 | var router = express.Router() | 3 | var router = express.Router() |
3 | 4 | ||
4 | router.get('/',function(req,res){ | 5 | router.get('/',function(req,res){ |
... | @@ -14,13 +15,47 @@ router.post('/process', function(req, res) { | ... | @@ -14,13 +15,47 @@ router.post('/process', function(req, res) { |
14 | var paramPassword = req.body.password || req.query.password; | 15 | var paramPassword = req.body.password || req.query.password; |
15 | //GET, POST 모두 고려해서 둘 다 검사 | 16 | //GET, POST 모두 고려해서 둘 다 검사 |
16 | 17 | ||
18 | + if(Conn.pool){ | ||
19 | + Conn.adduser(paramName, paramId, paramPassword, function(err, addedUser) { | ||
20 | + if(err){ | ||
21 | + console.error(err.stack); | ||
17 | res.writeHead('200', { 'Content-Type': 'text/html;charset=utf8' }); | 22 | res.writeHead('200', { 'Content-Type': 'text/html;charset=utf8' }); |
18 | - res.write('<h1>Result form Express Server</h1>'); | 23 | + res.write('<h1>추가 중 오류</h1>'); |
19 | res.write('<div><p>Param name : ' + paramName + '</p></div>'); | 24 | res.write('<div><p>Param name : ' + paramName + '</p></div>'); |
20 | res.write('<div><p>Param id : ' + paramId + '</p></div>'); | 25 | res.write('<div><p>Param id : ' + paramId + '</p></div>'); |
21 | res.write('<div><p>Param password : ' + paramPassword + '</p></div>'); | 26 | res.write('<div><p>Param password : ' + paramPassword + '</p></div>'); |
22 | res.write("<br><br><a href ='/login.html'>로그인 페이지로 돌아가기</a>"); | 27 | res.write("<br><br><a href ='/login.html'>로그인 페이지로 돌아가기</a>"); |
23 | res.end(); | 28 | res.end(); |
29 | + | ||
30 | + return; | ||
31 | + } | ||
32 | + if (addedUser){ | ||
33 | + console.dir(addedUser); | ||
34 | + | ||
35 | + res.writeHead('200', { 'Content-Type': 'text/html;charset=utf8' }); | ||
36 | + res.write('<h1>회원가입 성공</h1>'); | ||
37 | + res.write('<div><p>Param name : ' + paramName + '</p></div>'); | ||
38 | + res.write('<div><p>Param id : ' + paramId + '</p></div>'); | ||
39 | + res.write('<div><p>Param password : ' + paramPassword + '</p></div>'); | ||
40 | + res.write("<br><br><a href ='/login.html'>로그인 페이지로 돌아가기</a>"); | ||
41 | + res.end(); | ||
42 | + } else { | ||
43 | + res.writeHead('200', { 'Content-Type': 'text/html;charset=utf8' }); | ||
44 | + res.write('<h1>회원가입 실패.</h1>'); | ||
45 | + res.write('<div><p>Param id : ' + paramId + '</p></div>'); | ||
46 | + res.write('<div><p>Param password : ' + paramPassword + '</p></div>'); | ||
47 | + res.write("<br><br><a href ='/login.html'>로그인 페이지로 돌아가기</a>"); | ||
48 | + res.end(); | ||
49 | + } | ||
50 | + | ||
51 | + }) | ||
52 | + }else{ | ||
53 | + res.writeHead('200', { 'Content-Type': 'text/html;charset=utf8' }); | ||
54 | + res.write('<h1>데이터베이스 연결 실패</h1>'); | ||
55 | + res.end(); | ||
56 | + } | ||
57 | + | ||
58 | + | ||
24 | }); | 59 | }); |
25 | 60 | ||
26 | module.exports = router | 61 | module.exports = router |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | -../ejs/bin/cli.js | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../ejs/bin/cli.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../ejs/bin/cli.js" "$@" | ||
12 | +fi | ... | ... |
1 | -../jake/bin/cli.js | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../jake/bin/cli.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../jake/bin/cli.js" "$@" | ||
12 | +fi | ... | ... |
1 | -../mime/cli.js | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +#!/bin/sh | ||
2 | +basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | + | ||
4 | +case `uname` in | ||
5 | + *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | +esac | ||
7 | + | ||
8 | +if [ -x "$basedir/node" ]; then | ||
9 | + exec "$basedir/node" "$basedir/../mime/cli.js" "$@" | ||
10 | +else | ||
11 | + exec node "$basedir/../mime/cli.js" "$@" | ||
12 | +fi | ... | ... |
... | @@ -55,6 +55,14 @@ | ... | @@ -55,6 +55,14 @@ |
55 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", | 55 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", |
56 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" | 56 | "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" |
57 | }, | 57 | }, |
58 | + "node_modules/bignumber.js": { | ||
59 | + "version": "9.0.0", | ||
60 | + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.0.tgz", | ||
61 | + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", | ||
62 | + "engines": { | ||
63 | + "node": "*" | ||
64 | + } | ||
65 | + }, | ||
58 | "node_modules/body-parser": { | 66 | "node_modules/body-parser": { |
59 | "version": "1.20.0", | 67 | "version": "1.20.0", |
60 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", | 68 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", |
... | @@ -187,6 +195,11 @@ | ... | @@ -187,6 +195,11 @@ |
187 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", | 195 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", |
188 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" | 196 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" |
189 | }, | 197 | }, |
198 | + "node_modules/core-util-is": { | ||
199 | + "version": "1.0.3", | ||
200 | + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", | ||
201 | + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" | ||
202 | + }, | ||
190 | "node_modules/debug": { | 203 | "node_modules/debug": { |
191 | "version": "2.6.9", | 204 | "version": "2.6.9", |
192 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", | 205 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", |
... | @@ -453,6 +466,11 @@ | ... | @@ -453,6 +466,11 @@ |
453 | "node": ">= 0.10" | 466 | "node": ">= 0.10" |
454 | } | 467 | } |
455 | }, | 468 | }, |
469 | + "node_modules/isarray": { | ||
470 | + "version": "1.0.0", | ||
471 | + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", | ||
472 | + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" | ||
473 | + }, | ||
456 | "node_modules/jake": { | 474 | "node_modules/jake": { |
457 | "version": "10.8.5", | 475 | "version": "10.8.5", |
458 | "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", | 476 | "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", |
... | @@ -542,6 +560,25 @@ | ... | @@ -542,6 +560,25 @@ |
542 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", | 560 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", |
543 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" | 561 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" |
544 | }, | 562 | }, |
563 | + "node_modules/mysql": { | ||
564 | + "version": "2.18.1", | ||
565 | + "resolved": "https://registry.npmjs.org/mysql/-/mysql-2.18.1.tgz", | ||
566 | + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", | ||
567 | + "dependencies": { | ||
568 | + "bignumber.js": "9.0.0", | ||
569 | + "readable-stream": "2.3.7", | ||
570 | + "safe-buffer": "5.1.2", | ||
571 | + "sqlstring": "2.3.1" | ||
572 | + }, | ||
573 | + "engines": { | ||
574 | + "node": ">= 0.6" | ||
575 | + } | ||
576 | + }, | ||
577 | + "node_modules/mysql/node_modules/safe-buffer": { | ||
578 | + "version": "5.1.2", | ||
579 | + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", | ||
580 | + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" | ||
581 | + }, | ||
545 | "node_modules/negotiator": { | 582 | "node_modules/negotiator": { |
546 | "version": "0.6.3", | 583 | "version": "0.6.3", |
547 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", | 584 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", |
... | @@ -599,6 +636,11 @@ | ... | @@ -599,6 +636,11 @@ |
599 | "node": ">= 0.6.0" | 636 | "node": ">= 0.6.0" |
600 | } | 637 | } |
601 | }, | 638 | }, |
639 | + "node_modules/process-nextick-args": { | ||
640 | + "version": "2.0.1", | ||
641 | + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", | ||
642 | + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" | ||
643 | + }, | ||
602 | "node_modules/proxy-addr": { | 644 | "node_modules/proxy-addr": { |
603 | "version": "2.0.7", | 645 | "version": "2.0.7", |
604 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", | 646 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", |
... | @@ -647,6 +689,25 @@ | ... | @@ -647,6 +689,25 @@ |
647 | "node": ">= 0.8" | 689 | "node": ">= 0.8" |
648 | } | 690 | } |
649 | }, | 691 | }, |
692 | + "node_modules/readable-stream": { | ||
693 | + "version": "2.3.7", | ||
694 | + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", | ||
695 | + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", | ||
696 | + "dependencies": { | ||
697 | + "core-util-is": "~1.0.0", | ||
698 | + "inherits": "~2.0.3", | ||
699 | + "isarray": "~1.0.0", | ||
700 | + "process-nextick-args": "~2.0.0", | ||
701 | + "safe-buffer": "~5.1.1", | ||
702 | + "string_decoder": "~1.1.1", | ||
703 | + "util-deprecate": "~1.0.1" | ||
704 | + } | ||
705 | + }, | ||
706 | + "node_modules/readable-stream/node_modules/safe-buffer": { | ||
707 | + "version": "5.1.2", | ||
708 | + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", | ||
709 | + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" | ||
710 | + }, | ||
650 | "node_modules/safe-buffer": { | 711 | "node_modules/safe-buffer": { |
651 | "version": "5.2.1", | 712 | "version": "5.2.1", |
652 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", | 713 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", |
... | @@ -731,6 +792,14 @@ | ... | @@ -731,6 +792,14 @@ |
731 | "url": "https://github.com/sponsors/ljharb" | 792 | "url": "https://github.com/sponsors/ljharb" |
732 | } | 793 | } |
733 | }, | 794 | }, |
795 | + "node_modules/sqlstring": { | ||
796 | + "version": "2.3.1", | ||
797 | + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", | ||
798 | + "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=", | ||
799 | + "engines": { | ||
800 | + "node": ">= 0.6" | ||
801 | + } | ||
802 | + }, | ||
734 | "node_modules/statuses": { | 803 | "node_modules/statuses": { |
735 | "version": "2.0.1", | 804 | "version": "2.0.1", |
736 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", | 805 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", |
... | @@ -739,6 +808,19 @@ | ... | @@ -739,6 +808,19 @@ |
739 | "node": ">= 0.8" | 808 | "node": ">= 0.8" |
740 | } | 809 | } |
741 | }, | 810 | }, |
811 | + "node_modules/string_decoder": { | ||
812 | + "version": "1.1.1", | ||
813 | + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", | ||
814 | + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", | ||
815 | + "dependencies": { | ||
816 | + "safe-buffer": "~5.1.0" | ||
817 | + } | ||
818 | + }, | ||
819 | + "node_modules/string_decoder/node_modules/safe-buffer": { | ||
820 | + "version": "5.1.2", | ||
821 | + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", | ||
822 | + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" | ||
823 | + }, | ||
742 | "node_modules/supports-color": { | 824 | "node_modules/supports-color": { |
743 | "version": "7.2.0", | 825 | "version": "7.2.0", |
744 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", | 826 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
... | @@ -786,6 +868,11 @@ | ... | @@ -786,6 +868,11 @@ |
786 | "inherits": "2.0.3" | 868 | "inherits": "2.0.3" |
787 | } | 869 | } |
788 | }, | 870 | }, |
871 | + "node_modules/util-deprecate": { | ||
872 | + "version": "1.0.2", | ||
873 | + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", | ||
874 | + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" | ||
875 | + }, | ||
789 | "node_modules/util/node_modules/inherits": { | 876 | "node_modules/util/node_modules/inherits": { |
790 | "version": "2.0.3", | 877 | "version": "2.0.3", |
791 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", | 878 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", | ... | ... |
This diff is collapsed. Click to expand it.
... | @@ -15,6 +15,7 @@ | ... | @@ -15,6 +15,7 @@ |
15 | "express": "^4.18.1", | 15 | "express": "^4.18.1", |
16 | "express-error-handler": "^1.1.0", | 16 | "express-error-handler": "^1.1.0", |
17 | "http": "^0.0.1-security", | 17 | "http": "^0.0.1-security", |
18 | + "mysql": "^2.18.1", | ||
18 | "path": "^0.12.7", | 19 | "path": "^0.12.7", |
19 | "serve-static": "^1.15.0" | 20 | "serve-static": "^1.15.0" |
20 | } | 21 | } | ... | ... |
-
Please register or login to post a comment