Toggle navigation
Toggle navigation
This project
Loading...
Sign in
장주현
/
Amazon_Shopping_Helper
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
장주현
2020-06-25 18:41:27 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e369463305f64e603887634ba548ec4d11639fd8
e3694633
1 parent
44f226a2
주석 제거
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
app.js
app.js
View file @
e369463
...
...
@@ -16,8 +16,6 @@ app.use(bodyParser.urlencoded({extended: true}));
app
.
set
(
'views'
,
__dirname
+
'/views'
);
app
.
set
(
'view engine'
,
'ejs'
);
app
.
use
(
express
.
static
(
__dirname
+
'/public'
));
//var postcode = require(postcode.v2.html);
//const fs = require('filesystem')
var
addressK
,
addressE
;
var
detailaddressK
,
detailaddressE
;
var
extraaddressK
,
extraaddressE
;
...
...
@@ -25,19 +23,10 @@ var zipcode;
var
cityE
,
stateE
,
streetE
;
app
.
get
(
'/'
,
function
(
req
,
res
){
//res.send('hello world');
res
.
render
(
'index'
);
});
app
.
get
(
'/'
,
function
(
req
,
res
){
res
.
render
(
'index'
);
});
//app.use('/', indexRoute);
app
.
post
(
'/'
,
async
function
(
req
,
res
){
if
(
req
.
body
.
process
==
"주소 변환"
){
console
.
log
(
req
.
body
);
...
...
@@ -50,8 +39,6 @@ app.post('/', async function(req,res){
extraaddressK
=
extraaddressK
.
replace
(
")"
,
""
);
console
.
log
(
extraaddressK
);
console
.
log
(
addressK
);
//trans(detailaddressK, detailaddressE);
//trans(extraaddressK, extraaddressE);
request
.
post
(
{
url
:
PAPAGO_URL
,
...
...
@@ -93,7 +80,6 @@ app.post('/', async function(req,res){
},
300
);
setTimeout
(
function
(){
console
.
log
(
"set2: "
+
detailaddressE
)},
300
);
setTimeout
(
function
(){
console
.
log
(
"set2: "
+
extraaddressE
)},
300
);
//var splitaddressE = addressE.split(", ")
console
.
log
(
"address: "
+
addressE
);
if
(
req
.
body
.
os
==
"amazon"
){
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){
console
.
log
(
result
);
res
.
send
(
"원화: "
+
result
+
"원"
);
},
300
);
}
});
...
...
Please
register
or
login
to post a comment