This isn’t a NodeJS support forum, it’s the Twitch API support forum. And giving you the answer won’t help you in the long run.
You can a library like express to create a Web Server to listen and respond to requests.
Then a library like got to perform the creating of webhook subscriptions.
pseudocode:
express.route('/mycallback/')
.get((req,res) => { res.send(req.query['hub.callback']; })
.post(bodyparser(), (req,res) => {
res.send('Ok');
//do stuff with req.body
var payload = JSON.parse(req.body);
});
This isn’t right it’s just off the top of my head