wont_compile wont_compile - 17 days ago 12
Node.js Question

Run hubot as a part of express app

I have a pretty standard

express
app, built using the
express-generator
. Now, I would like to automate some of the things in the app with
hubot
and I have managed to successfully perform testing and run
hubot
with
slack
adapter. However, I would like to have the bot be a part of a regular app.

How can I change the structure of the app (I have a pretty standard import of
routes.js
which has all of the routes for the app) to allow for the two to run together?

This is running on
azure
as a
WebApp
and I have set up a continuous integration with
GitHub
, so I pretty much just push code and it gets deployed, I don't run anything manually on the actual server. I would be able to run the
hubot
and server it on a different subdomain or path on the app if it was a regular VPS, but since the
azure
is taking care of those things, I would need the
hubot
somehow baked-in the actual
express
app.

Answer

To add to this, in the end I moved to botkit library that provides way easier and integrated way to have both the server and the actual app.