Why my webhook is not triggering my server?

Buligan Razvan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2024

Hello guys, I created the following webhook: webhook.PNG

I created a small nodeJS application, that I launched it with the help of the command: 

ngrok http 3000. In NodeJS I have a very simple code: 

 

const express = require('express');

const bodyParser = require('body-parser');

const app = express();

app.use(bodyParser.json());

app.post('/webhook', (req, res) => {

  console.log('Webhook received:', JSON.stringify(req.body, null, 2));

  res.sendStatus(200);

});

const PORT = process.env.PORT || 3000;

app.listen(PORT, () => {

  console.log(`Server is running on port ${PORT}`);

});

Now my question is, What I am doing wrong? Because when I am using a curl in PowerShell t's working without any issue.

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events