botkit icon indicating copy to clipboard operation
botkit copied to clipboard

Missing example of using your own Express server

Open spasiu opened this issue 10 years ago • 7 comments

There are a number of allusions to using your own server, but no examples of how to plug botkit into your own server.

For example, from the readme:

// if you are already using Express, you can use your own server instance...
controller.setupWebserver(process.env.port,function(err,webserver) {
  controller.createWebhookEndpoints(controller.webserver);
});

and "If you need more than a simple webserver to receive webhooks, you should by all means create your own Express webserver!"

spasiu avatar Jan 28 '16 14:01 spasiu

Hmmm, I guess it's enough to just pass your express server to controller.createWebhookEndpoints... I guess I should PR it myself :P

spasiu avatar Jan 28 '16 15:01 spasiu

@spasiu I can add some docs if you want. I'm Working on some application which is currently planning on using this with express. Let me know, I'd prefer to add some simple example in the docs

jxm262 avatar Feb 03 '16 03:02 jxm262

:+1:

csinco avatar Feb 04 '16 00:02 csinco

+1 to docs being useful!

dannyfreed avatar Feb 04 '16 14:02 dannyfreed

I have published a demo using an Express server here: https://github.com/mvaragnat/botkit-express-demo

I will submit a PR linking this demo as an example

mvaragnat avatar Feb 15 '16 10:02 mvaragnat

The provided docs is for Slack, can we have an example with Express for Facebook as well?

eddievlagea avatar May 04 '16 10:05 eddievlagea

@creativityhurts For any coming from google, I have written about this on Stack Overflow and Medium

jonchurch avatar Jun 20 '17 20:06 jonchurch