From 9cdcd307ecafc5107734572112724ca5bc1e8c15 Mon Sep 17 00:00:00 2001 From: DavidKingV Date: Sun, 23 Jun 2024 11:55:30 -0600 Subject: [PATCH] se cambia el puerto por defecto --- main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index c043f84..f0eb6a2 100644 --- a/main.js +++ b/main.js @@ -8,7 +8,7 @@ const path = require('path'); const jwt = require('jsonwebtoken'); const app = express(); -const port = 3000; +const port = 0; app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); @@ -70,7 +70,8 @@ function authenticateToken(req, res, next) { app.post('/send-message', authenticateToken, (req, res) => { const { from, text } = req.body; - client.sendMessage(from, text).then(response => { + client.sendMessage(from, text).then(response => { + console.log(response); res.status(200).send(response); }).catch(error => { res.status(500).send(error);