Toggle navigation
Toggle navigation
This project
Loading...
Sign in
이종규
/
chatbot_project
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
JKL
2021-11-30 09:49:39 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b31602f196b33f6c54532e03e6b3c4f74cb5fd7b
b31602f1
1 parent
4b4a2e3f
Server_Update
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletions
app.js
app.js
View file @
b31602f
...
...
@@ -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
...
...
Please
register
or
login
to post a comment