node-gitlab-hook
node-gitlab-hook copied to clipboard
TypeError: Cannot read property 'remoteAddress' of undefined
I'm running this on Windows using iisnode (https://github.com/tjanczuk/iisnode)
var gitlabhook = require('gitlabhook');
var gitlab = gitlabhook({ host: 'localhost', port: process.env.PORT}, function(){
console.log('Webhook received');
});
gitlab.listen();
This is the error log when the Gitlab webhook hits my endpoint:
Application has thrown an uncaught exception and is terminated:
TypeError: Cannot read property 'remoteAddress' of undefined
at serverHandler (C:\Program Files\iisnode\www\express\node_modules\gitlabhook\gitlabhook.js:175:22)
at Server.emit (events.js:110:17)
at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:491:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
at Socket.socketOnData (_http_server.js:343:22)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at Pipe.onread (net.js:538:20)
Am I supposed to be using this in conjunction with Express?