Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍예림
/
emergency_room_ChatBot
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
김시환
2022-11-15 14:26:06 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8087b562392c5a3e619eaa71e7b35834ac2865f3
8087b562
1 parent
75623ff5
start
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
app.js
app.js
0 → 100644
View file @
8087b56
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
Please
register
or
login
to post a comment