-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
37 lines (28 loc) · 997 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require('dotenv').config();
const Server = require('./config/server');
const server = new Server();
server.listen();
// const express = require("express");
// const bodyParser = require("body-parser");
// const ngrok = require('ngrok');
// const app = express();
// const port = process.env.PORT || 3000;
// const ip = process.env.IP || "127.0.0.1";
// app.use(bodyParser.urlencoded({ extended: false }));
// app.use(bodyParser.json());
// app.post('/', function (req, res) {
// if (req.body.queryResult.action == "suma") {
// let num1 = parseFloat(req.body.queryResult.parameters.num1);
// let num2 = parseFloat(req.body.queryResult.parameters.num2);
// let sum = num1 + num2;
// response = num1 + " + " + num2 + " es " + sum;
// res.json({
// "fulfillmentText": response
// });
// }
// });
// app.listen(port, ip);
// (async function () {
// const url = await ngrok.connect(port);
// console.log(url);
// })();