JKL

Server_Update

Showing 1 changed file with 25 additions and 1 deletions
......@@ -9,4 +9,28 @@ app.get('/keyboard', (req, res) => {
res.json(data);
});
app.listen(3000, () => console.log('node on 3000'));
\ No newline at end of file
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(23023, () => console.log('node on 23023'));
\ No newline at end of file
......