Charca / bootbot

Facebook Messenger Bot Framework for Node.js
MIT License
974 stars 253 forks source link

Saving Data in Mongo? #127

Closed tdelam closed 6 years ago

tdelam commented 6 years ago

Hi,

Are there any examples or documentation as to how to save responses into mongo?

Azique commented 6 years ago

Hi, could you provide a bit more details about what you're trying to accomplish? Since in general storing a sting (array of strings) in mongo is pretty straightforward my guess is that it's not what you're looking for

mraaroncruz commented 6 years ago

@tdelam how do you normally store things in Mongo?

tdelam commented 6 years ago

Sorry, yah storing is simple but I mean... I am looking for a concept like a middleware. I didn't see anything about middleware in the docs so I am guessing this is not a thing with bootbot?

mraaroncruz commented 6 years ago

Bootbot runs on top of express. You can access the express app via:

const bot = new Bootbot({args});
const expressApp = bot.app;

There are a couple middleware related PR's too. Maybe some of the discussion can help. https://github.com/Charca/bootbot/pull/104 https://github.com/Charca/bootbot/pull/107