Hi! I recently read ghost’s documentation about it’s webhooks and I decided to try it out. I set up a simple express app for this purpose, here is the code:
const express = require('express');
const app = express();
const cors = require('cors');
app.use(cors({origin: ['http://localhost:2368']}));
app.post('/', (req, res) => {
console.log(req.body);
res.send()
});
app.listen(3000);
In Ghost Admin I created a custom integration with the following parameters:
Title: BulkMailer
//API keys omitted
API URL: http://localhost:2368
Webhook:
Post published
Target URL: http://localhost:3000
Secret: // i left it empty
After I created a post in ghost, my express endpoint was hit, but the body was undefined.
Ghost logs:
"msg":"Request to http://localhost:3000 failed because of: ETIMEDOUT."
Any idea?