Showing
1 changed file
with
0 additions
and
15 deletions
... | @@ -16,8 +16,6 @@ app.use(bodyParser.urlencoded({extended: true})); | ... | @@ -16,8 +16,6 @@ app.use(bodyParser.urlencoded({extended: true})); |
16 | app.set('views', __dirname + '/views'); | 16 | app.set('views', __dirname + '/views'); |
17 | app.set('view engine', 'ejs'); | 17 | app.set('view engine', 'ejs'); |
18 | app.use(express.static(__dirname + '/public')); | 18 | app.use(express.static(__dirname + '/public')); |
19 | -//var postcode = require(postcode.v2.html); | ||
20 | -//const fs = require('filesystem') | ||
21 | var addressK, addressE; | 19 | var addressK, addressE; |
22 | var detailaddressK, detailaddressE; | 20 | var detailaddressK, detailaddressE; |
23 | var extraaddressK, extraaddressE; | 21 | var extraaddressK, extraaddressE; |
... | @@ -25,19 +23,10 @@ var zipcode; | ... | @@ -25,19 +23,10 @@ var zipcode; |
25 | var cityE, stateE, streetE; | 23 | var cityE, stateE, streetE; |
26 | 24 | ||
27 | app.get('/', function(req, res){ | 25 | app.get('/', function(req, res){ |
28 | - //res.send('hello world'); | ||
29 | res.render('index'); | 26 | res.render('index'); |
30 | 27 | ||
31 | }); | 28 | }); |
32 | 29 | ||
33 | - app.get('/', function(req, res){ | ||
34 | - | ||
35 | - | ||
36 | - res.render('index'); | ||
37 | - }); | ||
38 | - | ||
39 | -//app.use('/', indexRoute); | ||
40 | - | ||
41 | app.post('/', async function(req,res){ | 30 | app.post('/', async function(req,res){ |
42 | if(req.body.process == "주소 변환"){ | 31 | if(req.body.process == "주소 변환"){ |
43 | console.log(req.body); | 32 | console.log(req.body); |
... | @@ -50,8 +39,6 @@ app.post('/', async function(req,res){ | ... | @@ -50,8 +39,6 @@ app.post('/', async function(req,res){ |
50 | extraaddressK = extraaddressK.replace(")", ""); | 39 | extraaddressK = extraaddressK.replace(")", ""); |
51 | console.log(extraaddressK); | 40 | console.log(extraaddressK); |
52 | console.log(addressK); | 41 | console.log(addressK); |
53 | - //trans(detailaddressK, detailaddressE); | ||
54 | - //trans(extraaddressK, extraaddressE); | ||
55 | request.post( | 42 | request.post( |
56 | { | 43 | { |
57 | url: PAPAGO_URL, | 44 | url: PAPAGO_URL, |
... | @@ -93,7 +80,6 @@ app.post('/', async function(req,res){ | ... | @@ -93,7 +80,6 @@ app.post('/', async function(req,res){ |
93 | },300); | 80 | },300); |
94 | setTimeout(function(){console.log("set2: " +detailaddressE)},300); | 81 | setTimeout(function(){console.log("set2: " +detailaddressE)},300); |
95 | setTimeout(function(){console.log("set2: " +extraaddressE)},300); | 82 | setTimeout(function(){console.log("set2: " +extraaddressE)},300); |
96 | - //var splitaddressE = addressE.split(", ") | ||
97 | console.log("address: " + addressE); | 83 | console.log("address: " + addressE); |
98 | if(req.body.os == "amazon"){ | 84 | if(req.body.os == "amazon"){ |
99 | res.render('amazonaddr', { cityE : cityE, stateE : stateE, streetE : streetE, detailaddressE : detailaddressE, extraaddressE : extraaddressE, zipcode : zipcode, os : req.body.os}); | 85 | res.render('amazonaddr', { cityE : cityE, stateE : stateE, streetE : streetE, detailaddressE : detailaddressE, extraaddressE : extraaddressE, zipcode : zipcode, os : req.body.os}); |
... | @@ -193,7 +179,6 @@ app.post('/', async function(req,res){ | ... | @@ -193,7 +179,6 @@ app.post('/', async function(req,res){ |
193 | console.log(result); | 179 | console.log(result); |
194 | res.send("원화: "+ result + "원"); | 180 | res.send("원화: "+ result + "원"); |
195 | },300); | 181 | },300); |
196 | - | ||
197 | } | 182 | } |
198 | }); | 183 | }); |
199 | 184 | ... | ... |
-
Please register or login to post a comment