김시환

update domain

const express = require('express');
const app = express();
app.use(express.urlencoded({ extended: false }));
app.use(express.json());
app.get('',(req,res)=> {
res.send('tset')
})
app.get('/keyboard', (req, res) => {
const data = {'type': 'text'}
res.json(data);
});
app.post('/message', (req, res) => {
const question = req.body.userRequest.utterance;
const goMain = '처음으로';
if (question === '테스트') {
const data = {
'version': '2.0',
'template': {
'outputs': [{
'simpleText': {
'text': '테스트'
}
}],
'quickReplies': [{
'label': goMain,
'action': 'message',
'messageText': goMain
}]
}
}
}
res.json(data);
});
app.listen(3000, () => console.log('node on 3000'));
\ No newline at end of file
......@@ -5,7 +5,7 @@ const TOKEN = '채널 토큰으로 변경'
const fs = require('fs');
const path = require('path');
const HTTPS = require('https');
const domain = "도메인 변경"
const domain = "ec2-13-57-178-27.us-west-1.compute.amazonaws.com"
const sslport = 23023;
const bodyParser = require('body-parser');
var app = express();
......