Showing
7 changed files
with
48 additions
and
39 deletions
| ... | @@ -3,49 +3,36 @@ var express = require('express'); | ... | @@ -3,49 +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 | - | ||
| 10 | var categoryRouter = require('./routes/category'); | 8 | var categoryRouter = require('./routes/category'); |
| 11 | var vendorRounter = require('./routes/vendors'); | 9 | var vendorRounter = require('./routes/vendors'); |
| 12 | - | ||
| 13 | var app = express(); | 10 | var app = express(); |
| 14 | var bodyParser = require('body-parser'); | 11 | var bodyParser = require('body-parser'); |
| 15 | - | ||
| 16 | // view engine setup | 12 | // view engine setup |
| 17 | app.set('views', path.join(__dirname, 'views')); | 13 | app.set('views', path.join(__dirname, 'views')); |
| 18 | app.set('view engine', 'ejs'); | 14 | app.set('view engine', 'ejs'); |
| 19 | - | ||
| 20 | app.use(logger('dev')); | 15 | app.use(logger('dev')); |
| 21 | app.use(express.json()); | 16 | app.use(express.json()); |
| 22 | app.use(express.urlencoded({ extended: false })); | 17 | app.use(express.urlencoded({ extended: false })); |
| 23 | app.use(cookieParser()); | 18 | app.use(cookieParser()); |
| 24 | app.use(express.static(path.join(__dirname, 'public'))); | 19 | app.use(express.static(path.join(__dirname, 'public'))); |
| 25 | - | ||
| 26 | app.use('/', indexRouter); | 20 | app.use('/', indexRouter); |
| 27 | app.use('/users', usersRouter); | 21 | app.use('/users', usersRouter); |
| 28 | app.use('/category', categoryRouter); | 22 | app.use('/category', categoryRouter); |
| 29 | app.use('/vendors/bootstrap', express.static(path.join(__dirname, "./node_modules/bootstrap/dist"))); | 23 | app.use('/vendors/bootstrap', express.static(path.join(__dirname, "./node_modules/bootstrap/dist"))); |
| 30 | app.use(bodyParser.urlencoded({ extended: false })); | 24 | app.use(bodyParser.urlencoded({ extended: false })); |
| 31 | - | ||
| 32 | // catch 404 and forward to error handler | 25 | // catch 404 and forward to error handler |
| 33 | app.use(function (req, res, next) { | 26 | app.use(function (req, res, next) { |
| 34 | next(createError(404)); | 27 | next(createError(404)); |
| 35 | }); | 28 | }); |
| 36 | -app.use('/category', categoryRouter); | ||
| 37 | -app.use('/vendors/bootstrap', express.static(path.join(__dirname, "./node_modules/bootstrap/dist"))); | ||
| 38 | -app.use(bodyParser.urlencoded({ extended: false })); | ||
| 39 | - | ||
| 40 | // error handler | 29 | // error handler |
| 41 | app.use(function (err, req, res, next) { | 30 | app.use(function (err, req, res, next) { |
| 42 | // set locals, only providing error in development | 31 | // set locals, only providing error in development |
| 43 | res.locals.message = err.message; | 32 | res.locals.message = err.message; |
| 44 | res.locals.error = req.app.get('env') === 'development' ? err : {}; | 33 | res.locals.error = req.app.get('env') === 'development' ? err : {}; |
| 45 | - | ||
| 46 | // render the error page | 34 | // render the error page |
| 47 | res.status(err.status || 500); | 35 | res.status(err.status || 500); |
| 48 | res.render('error'); | 36 | res.render('error'); |
| 49 | }); | 37 | }); |
| 50 | - | 38 | +module.exports = app; |
| 51 | -module.exports = app; | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -2,3 +2,4 @@ var express = require('express'); | ... | @@ -2,3 +2,4 @@ var express = require('express'); |
| 2 | var router = express.Router(); | 2 | var router = express.Router(); |
| 3 | var path = require('path'); | 3 | var path = require('path'); |
| 4 | router.use('/bootstrap', express.static(path.join(__dirname, "../node_modules/bootstrap/dist"))); | 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 | ... | ... |
| ... | @@ -94,8 +94,31 @@ | ... | @@ -94,8 +94,31 @@ |
| 94 | <form action="/category/park" method="post" name="location" id="location"> | 94 | <form action="/category/park" method="post" name="location" id="location"> |
| 95 | <select onchange="sm()" name="user_gu" id="user_gu_select"> | 95 | <select onchange="sm()" name="user_gu" id="user_gu_select"> |
| 96 | <option value='' selected="true" disabled="true">--Please choose an option--</option> | 96 | <option value='' selected="true" disabled="true">--Please choose an option--</option> |
| 97 | - <option value='금천구'>금천구</option> | ||
| 98 | <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> | ||
| 113 | + <option value='성북구'>성북구</option> | ||
| 114 | + <option value='송파구'>송파구</option> | ||
| 115 | + <option value='양천구'>양천구</option> | ||
| 116 | + <option value='영등포구'>영등포구</option> | ||
| 117 | + <option value='용산구'>용산구</option> | ||
| 118 | + <option value='은평구'>은평구</option> | ||
| 119 | + <option value='종로구'>종로구</option> | ||
| 120 | + <option value='중구'>중구</option> | ||
| 121 | + <option value='중랑구'>중랑구</option> | ||
| 99 | </select> | 122 | </select> |
| 100 | </form> | 123 | </form> |
| 101 | 124 | ... | ... |
| 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 | + </tr> | ||
| 7 | + </thead> | ||
| 8 | + <tbody> | ||
| 9 | + <tr> | ||
| 10 | + <td> | ||
| 11 | + <%=titles%> | ||
| 12 | + </td> | ||
| 13 | + </tr> | ||
| 14 | + | ||
| 15 | + </tbody> | ||
| 16 | +</table> | ||
| 17 | +<p class="sum">총 개수 : | ||
| 18 | + <%=appliance_list.length%> | ||
| 19 | +</p> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | <tbody> | 8 | <tbody> |
| 9 | <tr> | 9 | <tr> |
| 10 | <td> | 10 | <td> |
| 11 | - | 11 | + <%=titles%> |
| 12 | </td> | 12 | </td> |
| 13 | 13 | ||
| 14 | </tr> | 14 | </tr> |
| ... | @@ -16,5 +16,5 @@ | ... | @@ -16,5 +16,5 @@ |
| 16 | </tbody> | 16 | </tbody> |
| 17 | </table> | 17 | </table> |
| 18 | <p class="sum">총 동물약국 개수 : | 18 | <p class="sum">총 동물약국 개수 : |
| 19 | - | 19 | + <%-medicine_list.length%> |
| 20 | </p> | 20 | </p> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
views/results/protection.ejs
deleted
100644 → 0
| 1 | -<h4> 동물 보호소 현황</h4> | ||
| 2 | -<table class="table"> | ||
| 3 | - <thead class="thead-dark"> | ||
| 4 | - <tr> | ||
| 5 | - <th>동물 보호소명</th> | ||
| 6 | - </tr> | ||
| 7 | - </thead> | ||
| 8 | - <tbody> | ||
| 9 | - <tr> | ||
| 10 | - <td> | ||
| 11 | - <%=titles%> | ||
| 12 | - </td> | ||
| 13 | - | ||
| 14 | - </tr> | ||
| 15 | - | ||
| 16 | - </tbody> | ||
| 17 | -</table> | ||
| 18 | -<p class="sum">총 동물 보호소 개수 : | ||
| 19 | - <%=protection_list.length%> | ||
| 20 | -</p> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment