공정훈

Add question1

1 const express = require('express'); 1 const express = require('express');
2 const app = express(); 2 const app = express();
3 -const logger = require('morgan'); 3 +//const logger = require('morgan');
4 const bodyParser = require('body-parser'); 4 const bodyParser = require('body-parser');
5 5
6 const apiRouter = express.Router(); 6 const apiRouter = express.Router();
7 7
8 -app.use(logger('dev', {})); 8 +//app.use(logger('dev', {}));
9 app.use(bodyParser.json()); 9 app.use(bodyParser.json());
10 app.use(bodyParser.urlencoded({ 10 app.use(bodyParser.urlencoded({
11 extended: true 11 extended: true
...@@ -34,6 +34,31 @@ apiRouter.post('/sayHello', function(req, res) { ...@@ -34,6 +34,31 @@ apiRouter.post('/sayHello', function(req, res) {
34 res.status(200).send(responseBody); 34 res.status(200).send(responseBody);
35 }); 35 });
36 36
37 +apiRouter.post('/question1', (req, res) => {
38 + const responseBody = {
39 + version: "2.0",
40 + template: {
41 + outputs: [
42 + {
43 + basicCard: {
44 + title: "사람들과 어울리는 것을 좋아하나요?",
45 + buttons: [
46 + {
47 + label: 'Yes',
48 + action: 'message'
49 + }, {
50 + label: 'No',
51 + action: 'message'
52 + }
53 + ]
54 + }
55 + }
56 + ]
57 + }
58 + }
59 + res.json(responseBody);
60 +});
61 +
37 apiRouter.post('/question3', function(req, res) { 62 apiRouter.post('/question3', function(req, res) {
38 const responseBody = { 63 const responseBody = {
39 version: "2.0", 64 version: "2.0",
......