Skip to content

Commit

Permalink
se cambia el puerto por defecto
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidKingV committed Jun 23, 2024
1 parent c2cb166 commit 9cdcd30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }));
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 9cdcd30

Please sign in to comment.