Showing
3 changed files
with
31 additions
and
9 deletions
... | @@ -6,7 +6,7 @@ var logger = require('morgan'); | ... | @@ -6,7 +6,7 @@ var logger = require('morgan'); |
6 | 6 | ||
7 | var indexRouter = require('./routes/index'); | 7 | var indexRouter = require('./routes/index'); |
8 | var usersRouter = require('./routes/users'); | 8 | var usersRouter = require('./routes/users'); |
9 | -var selectRouter = require('./routes/select') | 9 | +var selectRouter = require('./routes/select'); |
10 | var app = express(); | 10 | var app = express(); |
11 | var bodyParser = require('body-parser'); | 11 | var bodyParser = require('body-parser'); |
12 | // view engine setup | 12 | // view engine setup |
... | @@ -20,7 +20,7 @@ app.use(cookieParser()); | ... | @@ -20,7 +20,7 @@ app.use(cookieParser()); |
20 | app.use(express.static(path.join(__dirname, '/static'))); //정적파일 위치 | 20 | app.use(express.static(path.join(__dirname, '/static'))); //정적파일 위치 |
21 | app.use('/', indexRouter); | 21 | app.use('/', indexRouter); |
22 | app.use('/users', usersRouter); | 22 | app.use('/users', usersRouter); |
23 | -app.use('/select', selectRouter) | 23 | +app.use('/select', selectRouter); |
24 | app.use(bodyParser.urlencoded({ extended: false })); | 24 | app.use(bodyParser.urlencoded({ extended: false })); |
25 | 25 | ||
26 | // catch 404 and forward to error handler | 26 | // catch 404 and forward to error handler | ... | ... |
... | @@ -4,6 +4,8 @@ var request = require('request'); | ... | @@ -4,6 +4,8 @@ var request = require('request'); |
4 | require('dotenv').config(); | 4 | require('dotenv').config(); |
5 | 5 | ||
6 | /* GET home page. */ | 6 | /* GET home page. */ |
7 | +let SIGUN_CODE; | ||
8 | +let SIGUNDONG_CODE; | ||
7 | 9 | ||
8 | // 사용자가 index 페이지에서 주소를 입력하고 넘어오면 | 10 | // 사용자가 index 페이지에서 주소를 입력하고 넘어오면 |
9 | router.post('/', function(req, res) { | 11 | router.post('/', function(req, res) { |
... | @@ -38,4 +40,24 @@ router.post('/', function(req, res) { | ... | @@ -38,4 +40,24 @@ router.post('/', function(req, res) { |
38 | res.render('select', { 'userLocation': req.body.userLocation }); | 40 | res.render('select', { 'userLocation': req.body.userLocation }); |
39 | }); | 41 | }); |
40 | 42 | ||
43 | +router.get('/food', function(req, res) { | ||
44 | + res.send('This is food'); | ||
45 | +}); | ||
46 | +router.get('/school', function(req, res) { | ||
47 | + res.send('This is school'); | ||
48 | +}); | ||
49 | +router.get('/park', function(req, res) { | ||
50 | + res.send('This is park'); | ||
51 | +}); | ||
52 | +router.get('/transport', function(req, res) { | ||
53 | + res.send('This is transport'); | ||
54 | +}); | ||
55 | +router.get('/safe', function(req, res) { | ||
56 | + res.send('This is safe'); | ||
57 | +}); | ||
58 | + | ||
59 | +router.get('/culture', function(req, res) { | ||
60 | + res.send('This is culture'); | ||
61 | +}); | ||
62 | + | ||
41 | module.exports = router; | 63 | module.exports = router; |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -11,12 +11,12 @@ html | ... | @@ -11,12 +11,12 @@ html |
11 | .card(style='background-color: skyblue; display: inline-block;') | 11 | .card(style='background-color: skyblue; display: inline-block;') |
12 | .card-image | 12 | .card-image |
13 | img(src='/restaurant.jpg' style='width:400px; height: 300px;') | 13 | img(src='/restaurant.jpg' style='width:400px; height: 300px;') |
14 | - h1.card-title 음식 | 14 | + h1.card-title 맛집 |
15 | .card-content | 15 | .card-content |
16 | p | 16 | p |
17 | | 주변 동네 맛집의 개수와 얼마나 다양한 음식점이 있는지 | 17 | | 주변 동네 맛집의 개수와 얼마나 다양한 음식점이 있는지 |
18 | .card-action | 18 | .card-action |
19 | - a(href='#') 검사! | 19 | + a(href='/select/food') 검사! |
20 | 20 | ||
21 | .card(style='background-color: skyblue; display: inline-block;') | 21 | .card(style='background-color: skyblue; display: inline-block;') |
22 | .card-image | 22 | .card-image |
... | @@ -26,7 +26,7 @@ html | ... | @@ -26,7 +26,7 @@ html |
26 | p | 26 | p |
27 | | 주변 학교, 학원 환경 | 27 | | 주변 학교, 학원 환경 |
28 | .card-action | 28 | .card-action |
29 | - a(href='#') 검사! | 29 | + a(href='/select/school') 검사! |
30 | 30 | ||
31 | .card(style='background-color: skyblue; display: inline-block;') | 31 | .card(style='background-color: skyblue; display: inline-block;') |
32 | .card-image | 32 | .card-image |
... | @@ -36,7 +36,7 @@ html | ... | @@ -36,7 +36,7 @@ html |
36 | p | 36 | p |
37 | | 주변 공원 | 37 | | 주변 공원 |
38 | .card-action | 38 | .card-action |
39 | - a(href='#') 검사! | 39 | + a(href='/select/park') 검사! |
40 | 40 | ||
41 | .card(style='background-color: skyblue; display: inline-block;') | 41 | .card(style='background-color: skyblue; display: inline-block;') |
42 | .card-image | 42 | .card-image |
... | @@ -46,7 +46,7 @@ html | ... | @@ -46,7 +46,7 @@ html |
46 | p | 46 | p |
47 | | 대중교통 편리도 | 47 | | 대중교통 편리도 |
48 | .card-action | 48 | .card-action |
49 | - a(href='#') 검사! | 49 | + a(href='/select/transport') 검사! |
50 | 50 | ||
51 | .card(style='background-color: skyblue; display: inline-block;') | 51 | .card(style='background-color: skyblue; display: inline-block;') |
52 | .card-image | 52 | .card-image |
... | @@ -56,7 +56,7 @@ html | ... | @@ -56,7 +56,7 @@ html |
56 | p | 56 | p |
57 | | 주변 경찰서, 범죄자 인근~~ | 57 | | 주변 경찰서, 범죄자 인근~~ |
58 | .card-action | 58 | .card-action |
59 | - a(href='#') 검사! | 59 | + a(href='/select/safe') 검사! |
60 | 60 | ||
61 | .card(style='background-color: skyblue; display: inline-block;') | 61 | .card(style='background-color: skyblue; display: inline-block;') |
62 | .card-image | 62 | .card-image |
... | @@ -66,5 +66,5 @@ html | ... | @@ -66,5 +66,5 @@ html |
66 | p | 66 | p |
67 | | 문화생활 시설 | 67 | | 문화생활 시설 |
68 | .card-action | 68 | .card-action |
69 | - a(href='#') 검사! | 69 | + a(href='/select/culture') 검사! |
70 | 70 | ... | ... |
-
Please register or login to post a comment