Seokjin

[UPDATE]tomorrow,weather

......@@ -64,16 +64,18 @@ app.post('/api/address', (req, res) => {
let a3=[], a4=[], a5=[], a6=[], a7=[], a8=[], a9=[], a10=[], a11=[], a12=[], a13=[], a14=[], a15=[], a16=[], a17=[], a18=[], a19=[], a20=[], a21=[], a22=[], a23=[];
//입력받기
app.post('/api/weather',(req,res)=>{
const nx = req.body.dotX;
const ny = req.body.dotY;
let Nx = req.body.dotX;
let Ny = req.body.dotY;
var queryParams = '?' + encodeURIComponent('serviceKey') + '=3OcUyvx97Vx2YikiZ9IHyRQ6suapku7Xn8VlefQKQWrGIFOGaejhbevwagcubdHfSiQAqJwCV5lyIutw0%2BsppA%3D%3D'; /* Service Key*/
var url = 'http://apis.data.go.kr/1360000/VilageFcstInfoService_2.0/getVilageFcst';
queryParams += '&' + encodeURIComponent('pageNo') + '=' + encodeURIComponent('1'); /* */
queryParams += '&' + encodeURIComponent('numOfRows') + '=' + encodeURIComponent('1000'); /* */
queryParams += '&' + encodeURIComponent('dataType') + '=' + encodeURIComponent('JSON'); /* */
queryParams += '&' + encodeURIComponent('base_date') + '=' + encodeURIComponent(base); /* */
queryParams += '&' + encodeURIComponent('base_time') + '=' + encodeURIComponent('2300'); /* */
queryParams += '&' + encodeURIComponent('nx') + '=' + encodeURIComponent(nx); /*nx*/
queryParams += '&' + encodeURIComponent('ny') + '=' + encodeURIComponent(ny); /*ny*/
queryParams += '&' + encodeURIComponent('nx') + '=' + encodeURIComponent(Nx); /*nx*/
queryParams += '&' + encodeURIComponent('ny') + '=' + encodeURIComponent(Ny); /*ny*/
request({
url: url + queryParams,
......@@ -119,6 +121,8 @@ app.post('/api/weather',(req,res)=>{
app.post('/api/tommorow',(req,res)=>{
const nx = req.body.dotX;
const ny = req.body.dotY;
var queryParams = '?' + encodeURIComponent('serviceKey') + '=3OcUyvx97Vx2YikiZ9IHyRQ6suapku7Xn8VlefQKQWrGIFOGaejhbevwagcubdHfSiQAqJwCV5lyIutw0%2BsppA%3D%3D'; /* Service Key*/
var url = 'http://apis.data.go.kr/1360000/VilageFcstInfoService_2.0/getVilageFcst';
queryParams += '&' + encodeURIComponent('pageNo') + '=' + encodeURIComponent('1'); /* */
queryParams += '&' + encodeURIComponent('numOfRows') + '=' + encodeURIComponent('1000'); /* */
......