Probot: Expose HttpServer from express-instance

Created on 6 Mar 2019  路  3Comments  路  Source: probot/probot

Feature Request

Would be great if we could have access to the HttpServer object returned from server.listen (https://github.com/probot/probot/blob/next/src/index.ts#L212)

This would allow more control over the internal server used. In my case, I am just playing around with Webpack HMR (strange ordeal, I know, but nodemon is too slow for me so I wanted to atleast give this a shot).

Most helpful comment

Hah all good @Jaskaranbir, we aim to exceed expectations 馃槑 馃惏 鈿★笍

All 3 comments

This is still covered by #878 - you don't need to use Probot's probot run to start the Express server, but can instead create a new HTTP server using the express app:

const app = probot.server // the Express app
const server = require('http').createServer(app)

Hope that answers your question. I realize the experience isn't great, but I think the question is better covered in #878.

Thanks, that indeed does help. My bad for opening two different issues for same topic, both got answered and closed way faster than I am used to lol (:man_facepalming:).

Hah all good @Jaskaranbir, we aim to exceed expectations 馃槑 馃惏 鈿★笍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

booninite picture booninite  路  3Comments

zeke picture zeke  路  6Comments

Nischay-Pro picture Nischay-Pro  路  5Comments

sotayamashita picture sotayamashita  路  3Comments

Jake-Gillberg picture Jake-Gillberg  路  3Comments