김시환

update domain

1 -const express = require('express');
2 -const app = express();
3 -
4 -app.use(express.urlencoded({ extended: false }));
5 -app.use(express.json());
6 -
7 -app.get('',(req,res)=> {
8 - res.send('tset')
9 -})
10 -
11 -
12 -app.get('/keyboard', (req, res) => {
13 - const data = {'type': 'text'}
14 - res.json(data);
15 -});
16 -
17 -app.post('/message', (req, res) => {
18 - const question = req.body.userRequest.utterance;
19 - const goMain = '처음으로';
20 -
21 - if (question === '테스트') {
22 - const data = {
23 - 'version': '2.0',
24 - 'template': {
25 - 'outputs': [{
26 - 'simpleText': {
27 - 'text': '테스트'
28 - }
29 - }],
30 - 'quickReplies': [{
31 - 'label': goMain,
32 - 'action': 'message',
33 - 'messageText': goMain
34 - }]
35 - }
36 - }
37 - }
38 - res.json(data);
39 -});
40 -
41 -app.listen(3000, () => console.log('node on 3000'));
...\ No newline at end of file ...\ No newline at end of file
...@@ -5,7 +5,7 @@ const TOKEN = '채널 토큰으로 변경' ...@@ -5,7 +5,7 @@ const TOKEN = '채널 토큰으로 변경'
5 const fs = require('fs'); 5 const fs = require('fs');
6 const path = require('path'); 6 const path = require('path');
7 const HTTPS = require('https'); 7 const HTTPS = require('https');
8 -const domain = "도메인 변경" 8 +const domain = "ec2-13-57-178-27.us-west-1.compute.amazonaws.com"
9 const sslport = 23023; 9 const sslport = 23023;
10 const bodyParser = require('body-parser'); 10 const bodyParser = require('body-parser');
11 var app = express(); 11 var app = express();
......