Toggle navigation
Toggle navigation
This project
Loading...
Sign in
공정훈
/
find_mbti_bot
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-05-25 23:30:30 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2c9341393a66a8cc43d47e6133bca5ac09188b93
2c934139
1 parent
b1204dda
Add question1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
app/app.js
app/app.js
View file @
2c93413
const
express
=
require
(
'express'
);
const
app
=
express
();
const
logger
=
require
(
'morgan'
);
//
const logger = require('morgan');
const
bodyParser
=
require
(
'body-parser'
);
const
apiRouter
=
express
.
Router
();
app
.
use
(
logger
(
'dev'
,
{}));
//
app.use(logger('dev', {}));
app
.
use
(
bodyParser
.
json
());
app
.
use
(
bodyParser
.
urlencoded
({
extended
:
true
...
...
@@ -34,6 +34,31 @@ apiRouter.post('/sayHello', function(req, res) {
res
.
status
(
200
).
send
(
responseBody
);
});
apiRouter
.
post
(
'/question1'
,
(
req
,
res
)
=>
{
const
responseBody
=
{
version
:
"2.0"
,
template
:
{
outputs
:
[
{
basicCard
:
{
title
:
"사람들과 어울리는 것을 좋아하나요?"
,
buttons
:
[
{
label
:
'Yes'
,
action
:
'message'
},
{
label
:
'No'
,
action
:
'message'
}
]
}
}
]
}
}
res
.
json
(
responseBody
);
});
apiRouter
.
post
(
'/question3'
,
function
(
req
,
res
)
{
const
responseBody
=
{
version
:
"2.0"
,
...
...
Please
register
or
login
to post a comment