Eunsu486

Merge branch 'eunsu' into 'master'

Eunsu

Merge From eunsu into master

See merge request !3
...@@ -3,42 +3,36 @@ var express = require('express'); ...@@ -3,42 +3,36 @@ var express = require('express');
3 var path = require('path'); 3 var path = require('path');
4 var cookieParser = require('cookie-parser'); 4 var cookieParser = require('cookie-parser');
5 var logger = require('morgan'); 5 var logger = require('morgan');
6 -
7 var indexRouter = require('./routes/index'); 6 var indexRouter = require('./routes/index');
8 var usersRouter = require('./routes/users'); 7 var usersRouter = require('./routes/users');
9 -//var categoryRouter = require('./routes/category');
10 var categoryRouter = require('./routes/category'); 8 var categoryRouter = require('./routes/category');
11 - 9 +var vendorRounter = require('./routes/vendors');
12 var app = express(); 10 var app = express();
13 - 11 +var bodyParser = require('body-parser');
14 // view engine setup 12 // view engine setup
15 app.set('views', path.join(__dirname, 'views')); 13 app.set('views', path.join(__dirname, 'views'));
16 app.set('view engine', 'ejs'); 14 app.set('view engine', 'ejs');
17 -
18 app.use(logger('dev')); 15 app.use(logger('dev'));
19 app.use(express.json()); 16 app.use(express.json());
20 app.use(express.urlencoded({ extended: false })); 17 app.use(express.urlencoded({ extended: false }));
21 app.use(cookieParser()); 18 app.use(cookieParser());
22 app.use(express.static(path.join(__dirname, 'public'))); 19 app.use(express.static(path.join(__dirname, 'public')));
23 -
24 app.use('/', indexRouter); 20 app.use('/', indexRouter);
25 app.use('/users', usersRouter); 21 app.use('/users', usersRouter);
26 app.use('/category', categoryRouter); 22 app.use('/category', categoryRouter);
27 - 23 +app.use('/vendors/bootstrap', express.static(path.join(__dirname, "./node_modules/bootstrap/dist")));
24 +app.use(bodyParser.urlencoded({ extended: false }));
28 // catch 404 and forward to error handler 25 // catch 404 and forward to error handler
29 app.use(function (req, res, next) { 26 app.use(function (req, res, next) {
30 next(createError(404)); 27 next(createError(404));
31 }); 28 });
32 -
33 // error handler 29 // error handler
34 app.use(function (err, req, res, next) { 30 app.use(function (err, req, res, next) {
35 // set locals, only providing error in development 31 // set locals, only providing error in development
36 res.locals.message = err.message; 32 res.locals.message = err.message;
37 res.locals.error = req.app.get('env') === 'development' ? err : {}; 33 res.locals.error = req.app.get('env') === 'development' ? err : {};
38 -
39 // render the error page 34 // render the error page
40 res.status(err.status || 500); 35 res.status(err.status || 500);
41 res.render('error'); 36 res.render('error');
42 }); 37 });
43 -
44 module.exports = app; 38 module.exports = app;
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 "_resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", 22 "_resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz",
23 "_shasum": "927d2f6947f7f1c19a316dd8eea3614e8b18f8e9", 23 "_shasum": "927d2f6947f7f1c19a316dd8eea3614e8b18f8e9",
24 "_spec": "xml-js@^1.6.11", 24 "_spec": "xml-js@^1.6.11",
25 - "_where": "C:\\Users\\se051\\OneDrive\\바탕 화면\\나의 대학라이프\\오픈소스SW개발\\텀프\\animal-Info", 25 + "_where": "C:\\Users\\owterm\\animal-Info",
26 "author": { 26 "author": {
27 "name": "Yousuf Almarzooqi", 27 "name": "Yousuf Almarzooqi",
28 "email": "ysf953@gmail.com" 28 "email": "ysf953@gmail.com"
......
1 { 1 {
2 - "_from": "xml2js", 2 + "_from": "xml2js@^0.4.23",
3 "_id": "xml2js@0.4.23", 3 "_id": "xml2js@0.4.23",
4 "_inBundle": false, 4 "_inBundle": false,
5 "_integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", 5 "_integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
6 "_location": "/xml2js", 6 "_location": "/xml2js",
7 "_phantomChildren": {}, 7 "_phantomChildren": {},
8 "_requested": { 8 "_requested": {
9 - "type": "tag", 9 + "type": "range",
10 "registry": true, 10 "registry": true,
11 - "raw": "xml2js", 11 + "raw": "xml2js@^0.4.23",
12 "name": "xml2js", 12 "name": "xml2js",
13 "escapedName": "xml2js", 13 "escapedName": "xml2js",
14 - "rawSpec": "", 14 + "rawSpec": "^0.4.23",
15 "saveSpec": null, 15 "saveSpec": null,
16 - "fetchSpec": "latest" 16 + "fetchSpec": "^0.4.23"
17 }, 17 },
18 "_requiredBy": [ 18 "_requiredBy": [
19 "#USER", 19 "#USER",
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
21 ], 21 ],
22 "_resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", 22 "_resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
23 "_shasum": "a0c69516752421eb2ac758ee4d4ccf58843eac66", 23 "_shasum": "a0c69516752421eb2ac758ee4d4ccf58843eac66",
24 - "_spec": "xml2js", 24 + "_spec": "xml2js@^0.4.23",
25 - "_where": "C:\\Users\\se051\\OneDrive\\바탕 화면\\나의 대학라이프\\오픈소스SW개발\\텀프\\animal-Info", 25 + "_where": "C:\\Users\\owterm\\animal-Info",
26 "author": { 26 "author": {
27 "name": "Marek Kubica", 27 "name": "Marek Kubica",
28 "email": "marek@xivilization.net", 28 "email": "marek@xivilization.net",
......
This diff is collapsed. Click to expand it.
1 +var express = require('express');
2 +var router = express.Router();
3 +var path = require('path');
4 +router.use('/bootstrap', express.static(path.join(__dirname, "../node_modules/bootstrap/dist")));
5 +module.exports = router;
...\ No newline at end of file ...\ No newline at end of file
1 +<!DOCTYPE html>
2 +<html lang="ko">
3 +
4 +<head>
5 + <meta charset="UTF-8">
6 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 + <link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap.min.css' />
8 + <link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-grid.min.css' />
9 + <link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-reboot.min.css' />
10 + <link rel='stylesheet' href='/css/category.css'>
11 + <link rel="preconnect" href="https://fonts.gstatic.com">
12 + <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300&display=swap" rel="stylesheet">
13 + <title>📝 진단 검사</title>
14 +</head>
15 +
16 +<body>
17 + <%- include('components/locationJumbotron') -%>
18 + <%- include('components/category') -%>
19 +</body>
20 +
21 +</html>
...\ No newline at end of file ...\ No newline at end of file
1 <ul class="nav nav-pills nav-stacked"> 1 <ul class="nav nav-pills nav-stacked">
2 - <li role="presentation" class="active"><a href="#">동물 병원</a></li> 2 + <li role="presentation"><a href="">사용법</a></li>
3 - <li role="presentation"><a href="#">동물 약국</a></li> 3 + <li role="presentation" class="active"><a href="/category/hospital">🏥동물 병원🏥</a></li>
4 - <li role="presentation"><a href="#">공원</a></li> 4 + <li role="presentation"><a href="/category/medicine">💊동물 약국💊</a></li>
5 - <li role="presentation"><a href="#">동물 보호 시설</a></li> 5 + <li role="presentation"><a href="/category/appliance">🩺동물의료기기 판매🩺</a></li>
6 + <li role="presentation"><a href="/category/park">🌳체육시설🌳</a></li>
6 </ul> 7 </ul>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,16 +2,13 @@ ...@@ -2,16 +2,13 @@
2 <html> 2 <html>
3 3
4 <head> 4 <head>
5 - <title>Animal Info</title> 5 + <title>🐶 Animal Info</title>
6 <!-- 합쳐지고 최소화된 최신 CSS --> 6 <!-- 합쳐지고 최소화된 최신 CSS -->
7 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"> 7 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
8 -
9 <!-- 부가적인 테마 --> 8 <!-- 부가적인 테마 -->
10 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css"> 9 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
11 -
12 <!-- 합쳐지고 최소화된 최신 자바스크립트 --> 10 <!-- 합쳐지고 최소화된 최신 자바스크립트 -->
13 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script> 11 <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
14 -
15 <style> 12 <style>
16 html { 13 html {
17 min-height: 100%; 14 min-height: 100%;
...@@ -65,43 +62,58 @@ ...@@ -65,43 +62,58 @@
65 font-size: xx-large; 62 font-size: xx-large;
66 } 63 }
67 </style> 64 </style>
68 -
69 <script> 65 <script>
70 function sm() { 66 function sm() {
71 document.getElementById("location").submit(); 67 document.getElementById("location").submit();
72 } 68 }
73 </script> 69 </script>
74 -
75 -
76 </head> 70 </head>
77 71
78 <body> 72 <body>
79 -
80 <header id="header"> 73 <header id="header">
81 <%- include("components/header") -%> 74 <%- include("components/header") -%>
82 </header> 75 </header>
83 -
84 <div class="content"> 76 <div class="content">
85 <div class="nav"> 77 <div class="nav">
86 <%- include("components/navigation") -%> 78 <%- include("components/navigation") -%>
87 </div> 79 </div>
88 -
89 <div class="jumbotron"> 80 <div class="jumbotron">
90 <h2>서울시 동물 병원 검색</h2> 81 <h2>서울시 동물 병원 검색</h2>
91 <p> 82 <p>
92 지역 선택 83 지역 선택
93 </p> 84 </p>
94 - <form action="/category/park" method="post" name="location" id="location"> 85 + <form action="/category" method="POST" name="location" id="location">
95 <select onchange="sm()" name="user_gu" id="user_gu_select"> 86 <select onchange="sm()" name="user_gu" id="user_gu_select">
96 <option value='' selected="true" disabled="true">--Please choose an option--</option> 87 <option value='' selected="true" disabled="true">--Please choose an option--</option>
97 - <option value='금천구'>금천구</option>
98 <option value='강남구'>강남구</option> 88 <option value='강남구'>강남구</option>
89 + <option value='강동구'>강동구</option>
90 + <option value='강북구'>강북구</option>
91 + <option value='강서구'>강서구</option>
92 + <option value='관악구'>관악구</option>
93 + <option value='광진구'>광진구</option>
94 + <option value='구로구'>구로구</option>
95 + <option value='금천구'>금천구</option>
96 + <option value='노원구'>노원구</option>
97 + <option value='도봉구'>도봉구</option>
98 + <option value='동대문구'>동대문구</option>
99 + <option value='동작구'>동작구</option>
100 + <option value='마포구'>마포구</option>
101 + <option value='서대문구'>서대문구</option>
102 + <option value='서초구'>서초구</option>
103 + <option value='성동구'>성동구</option>
104 + <option value='성북구'>성북구</option>
105 + <option value='송파구'>송파구</option>
106 + <option value='양천구'>양천구</option>
107 + <option value='영등포구'>영등포구</option>
108 + <option value='용산구'>용산구</option>
109 + <option value='은평구'>은평구</option>
110 + <option value='종로구'>종로구</option>
111 + <option value='중구'>중구</option>
112 + <option value='중랑구'>중랑구</option>
99 </select> 113 </select>
100 </form> 114 </form>
101 </div> 115 </div>
102 </div> 116 </div>
103 -
104 -
105 <footer id="footer"> 117 <footer id="footer">
106 <%- include("components/footer") -%> 118 <%- include("components/footer") -%>
107 </footer> 119 </footer>
......
1 +<!DOCTYPE html>
2 +<html lang="ko">
3 +
4 +<head>
5 + <meta charset="UTF-8">
6 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 + <link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap.min.css' />
8 + <link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-grid.min.css' />
9 + <link rel='stylesheet' href='/vendors/bootstrap/css/bootstrap-reboot.min.css' />
10 + <link rel="preconnect" href="https://fonts.gstatic.com">
11 + <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300&display=swap" rel="stylesheet">
12 + <title>📝 결과</title>
13 +</head>
14 +
1 <body> 15 <body>
2 <%- include(`results/${category}`) -%> 16 <%- include(`results/${category}`) -%>
3 </body> 17 </body>
18 +
19 +</html>
...\ No newline at end of file ...\ No newline at end of file
......
1 -it's appliance page
...\ No newline at end of file ...\ No newline at end of file
1 +<h4>🩺 동물의료기기 판매 및 임대업체 현황</h4>
2 +<table class="table">
3 + <thead class="thead-dark">
4 + <tr>
5 + <th>이름</th>
6 + <th>도로명주소</th>
7 + </tr>
8 + </thead>
9 + <tbody>
10 + <%for (var i=0; i <appliance_list.length; i++){%>
11 + <tr>
12 + <td>
13 + <%=appliance_list[i].title._text%>
14 + </td>
15 + <td>
16 + <%=appliance_list[i].venue._text%>
17 + </td>
18 + </tr>
19 + <%}%>
20 +
21 + </tbody>
22 +</table>
23 +<p class="sum">총 개수 :
24 + <%=appliance_list.length%>
25 +</p>
...\ No newline at end of file ...\ No newline at end of file
......
1 -it's hospital page
...\ No newline at end of file ...\ No newline at end of file
1 +<h4>🏥 동물병원 현황</h4>
2 +<table class="table">
3 + <thead class="thead-dark">
4 + <tr>
5 + <th>동물병원명</th>
6 + <th>도로명주소</th>
7 + </tr>
8 + </thead>
9 + <tbody>
10 + <%for (var i=0; i <hospital_list.length; i++){%>
11 + <tr>
12 + <td>
13 + <%=hospital_list[i].title._text%>
14 + </td>
15 + <td>
16 + <%=hospital_list[i].venue._text%>
17 + </td>
18 + </tr>
19 + <%}%>
20 +
21 + </tbody>
22 +</table>
23 +<p class="sum">총 동물병원 개수 :
24 + <%-hospital_list.length%>
25 +</p>
...\ No newline at end of file ...\ No newline at end of file
......
1 -it's medicine page
...\ No newline at end of file ...\ No newline at end of file
1 +<h4> 💊동물약국 현황</h4>
2 +<table class="table">
3 + <thead class="thead-dark">
4 + <tr>
5 + <th>동물약국명</th>
6 + <th>도로명주소</th>
7 + </tr>
8 + </thead>
9 + <tbody>
10 + <%for (var i=0; i <category_list.length; i++){%>
11 + <tr>
12 + <td>
13 + <%=category_list[i].title._text%>
14 + </td>
15 + <td>
16 + <%=category_list[i].venue._text%>
17 + </td>
18 + </tr>
19 + <%}%>
20 +
21 + </tbody>
22 +</table>
23 +<p class="sum">총 동물약국 개수 :
24 + <%-category_list.length%>
25 +</p>
...\ No newline at end of file ...\ No newline at end of file
......
1 -it's park page
...\ No newline at end of file ...\ No newline at end of file
1 +<h4>🌳 도시공원 현황</h4>
2 +<table class="table">
3 + <thead class="thead-dark">
4 + <tr>
5 + <th>도시공원명</th>
6 + <th>도로명주소</th>
7 + </tr>
8 + </thead>
9 + <tbody>
10 + <%for (var i=0; i <appliance_list.length; i++){%>
11 + <tr>
12 + <td>
13 + <%=appliance_list[i].title._text%>
14 + </td>
15 + <td>
16 + <%=appliance_list[i].venue._text%>
17 + </td>
18 + </tr>
19 + <%}%>
20 +
21 + </tbody>
22 +</table>
23 +<p class="sum">총 도시공원 개수 :
24 + <%=appliance_list.length%>
25 +</p>
...\ No newline at end of file ...\ No newline at end of file
......