Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김원진
/
Expresswayinfo24
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최현영
2020-06-05 17:44:45 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e923498c2fb8735052c0d88618a4fc47ae2336d6
e923498c
1 parent
7792b2df
Expressfee.json added:
:
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
whereur/app.js
whereur/public/Expressfee.json
whereur/app.js
View file @
e923498
...
...
@@ -3,18 +3,23 @@ const request = require('request');
const
bodyParser
=
require
(
'body-parser'
);
var
app
=
express
();
var
static
=
require
(
'serve-static'
);
//const xlsx = require('xlsx');
const
fs
=
require
(
'fs'
);
const
path
=
require
(
'path'
);
const
HTTPS
=
require
(
'https'
);
const
TARGET_URL
=
'https://api.line.me/v2/bot/message/reply'
const
TOKEN
=
'sqNjA99TptppqvcoVFAnU7Kawsl+s7l+JgnZ7r2is97qrFQraIn0sLQ6mTsIPvXLG7FNK34rvjkXbgwuy0/bgrUn4J5eYPn4H/IH27MdimpiXo/yv+obIN9IKlqR+EF2gLmuXSxMU/LWzyGxCk1G0gdB04t89/1O/w1cDnyilFU='
//const PAPAGO_URL = 'https://openapi.naver.com/v1/papago/n2mt'
//const PAPAGO_ID = 'AH9WUFCtTrz9xnJ6dpxB'
//const PAPAGO_SECRET = 'um7UxSvbxD'
//const workbook = xlsx.readFile(__dirname + '/pyblic/Expressfee.xlsx');
const
domain
=
"www.chyoss.tk"
const
sslport
=
23023
;
const
buffer
=
fs
.
readFileSync
(
'/public/Expressfee.json'
);
const
datafeejson
=
buffer
.
toString
();
const
feedata
=
JSON
.
parse
(
datafeejson
);
console
.
log
(
"Expressfee.json 파일 읽기"
);
app
.
use
(
bodyParser
.
json
());
//전역변수 선언
...
...
@@ -693,7 +698,7 @@ function roadcongest(eventObj, msg ){
for
(
var
i
=
0
;
i
<
jsonForcongest
.
list
.
length
;
i
++
){
if
(
jsonForcongest
.
list
[
i
].
routeNo
.
indexOf
(
number
)
>=
0
){
count
+=
1
;
roadnumberstring
+=
(
"
- 노선이름: "
+
jsonForcongest
.
list
[
i
].
routeName
+
", 정체구간: "
+
jsonForcongest
.
list
[
i
].
conzoneName
+
', 기점종점방향: '
+
jsonForcongest
.
list
[
i
].
updownTypeCode
+
', 교통량: '
+
jsonForcongest
.
list
[
i
].
trafficAmout
+
', 평균속도: '
+
jsonForcongest
.
list
[
i
].
speed
+
"
"
);
roadnumberstring
+=
(
"
# 노선이름: "
+
jsonForcongest
.
list
[
i
].
routeName
+
", 정체구간: "
+
jsonForcongest
.
list
[
i
].
conzoneName
+
', 기점종점방향: '
+
jsonForcongest
.
list
[
i
].
updownTypeCode
+
', 교통량: '
+
jsonForcongest
.
list
[
i
].
trafficAmout
+
', 평균속도: '
+
jsonForcongest
.
list
[
i
].
speed
+
"
"
);
}
}
...
...
whereur/public/Expressfee.json
0 → 100644
View file @
e923498
This diff could not be displayed because it is too large.
Please
register
or
login
to post a comment