Suyeon Jung

Modify select view

......@@ -17,4 +17,4 @@
"xhr": "^2.5.0",
"xmlhttprequest": "^1.8.0"
}
}
\ No newline at end of file
}
......
var express = require('express');
var router = express.Router();
var request = require('request');
/* GET home page. */
router.post('/', function(req, res) {
let kakaoOptions = {
url: 'https://dapi.kakao.com/v2/local/search/address.json?query=잠실역',
method: 'GET',
headers: {
'Authorization': 'KakaoAK 4803a487ea1fb1646e4a8dd8c002ad7d'
},
// qs: {
// query: '잠실역'
// },
encoding: 'UTF-8',
}
request(kakaoOptions, function(err, res, body) {
if (!err && res.statusCode == 200) {
console.log(JSON.parse(body));
}
})
res.render('select', { 'si': req.body.si, 'ku': req.body.ku });
});
......
//- doctype html
doctype html
html
head
if location =="n"
button k
body
block content
h1 #{si}
h1 #{ku}
h1 당신의 동네 : #{si} #{ku}
.row
.col.s12.m7
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/restaurant.jpg' style='width:400px; height: 300px;')
h1.card-title 음식
.card-content
p
| 주변 동네 맛집의 개수와 얼마나 다양한 음식점이 있는지
.card-action
a(href='#') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/school.jpg' style='width:400px; height: 300px;')
h1.card-title 학군
.card-content
p
| 주변 학교, 학원 환경
.card-action
a(href='#') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/park.jpg' style='width:400px; height: 300px;')
h1.card-title 공원
.card-content
p
| 주변 공원
.card-action
a(href='#') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/public_transport.jpg' style='width:400px; height: 300px;')
h1.card-title 대중교통
.card-content
p
| 대중교통 편리도
.card-action
a(href='#') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/safe.jpg' style='width:400px; height: 300px;')
h1.card-title 안전
.card-content
p
| 주변 경찰서, 범죄자 인근~~
.card-action
a(href='#') 검사!
.card(style='background-color: skyblue; display: inline-block;')
.card-image
img(src='/cultural_life.jpg' style='width:400px; height: 300px;')
h1.card-title 여가
.card-content
p
| 문화생활 시설
.card-action
a(href='#') 검사!
......