Showing
1 changed file
with
2 additions
and
2 deletions
1 | const lineCtrl = require("./line.ctrl"); | 1 | const lineCtrl = require("./line.ctrl"); |
2 | 2 | ||
3 | 3 | ||
4 | -var express = require('express'); | 4 | +var Koa = require('koa'); |
5 | const request = require('request'); | 5 | const request = require('request'); |
6 | const TARGET_URL = 'https://api.line.me/v2/bot/message/reply' | 6 | const TARGET_URL = 'https://api.line.me/v2/bot/message/reply' |
7 | const TOKEN = 'tdN03DyXDAcKGZsuiPndaU7UC2GzuEQYUhPCkDnGWXGGdiPmV15QYbFU1U5JP5EpiETIKLqOmci/RxFZTfD7FRMED0OpT+3qgEYBNf8T9/jRzHRm7rblBLtzFBVOeXeYRcluOsz4koE4JaAJaUtMtwdB04t89/1O/w1cDnyilFU=' | 7 | const TOKEN = 'tdN03DyXDAcKGZsuiPndaU7UC2GzuEQYUhPCkDnGWXGGdiPmV15QYbFU1U5JP5EpiETIKLqOmci/RxFZTfD7FRMED0OpT+3qgEYBNf8T9/jRzHRm7rblBLtzFBVOeXeYRcluOsz4koE4JaAJaUtMtwdB04t89/1O/w1cDnyilFU=' |
... | @@ -12,7 +12,7 @@ const domain = "www.osstest17.ml" | ... | @@ -12,7 +12,7 @@ const domain = "www.osstest17.ml" |
12 | const sslport = 23023; | 12 | const sslport = 23023; |
13 | 13 | ||
14 | const bodyParser = require('body-parser'); | 14 | const bodyParser = require('body-parser'); |
15 | -var app = express(); | 15 | +var app = new Koa(); |
16 | app.use(bodyParser.json()); | 16 | app.use(bodyParser.json()); |
17 | let username; //username 저장 | 17 | let username; //username 저장 |
18 | app.post('/hook', function (req, res) { | 18 | app.post('/hook', function (req, res) { | ... | ... |
-
Please register or login to post a comment