botkit-starter-web icon indicating copy to clipboard operation
botkit-starter-web copied to clipboard

Integrate botkit web with botkit CMS tool

Open dhgokul opened this issue 4 years ago • 2 comments

Please provide code snippet or steps to use botkit CMS tool in botkit web code. as of now we running botkit CMS from source

https://github.com/howdyai/botkit-cms

I am not able to use this code in bot.js (web)

controller.use(new BotkitCMSHelper({ uri: process.env.CMS_URI, token: process.env.CMS_TOKEN }));

// use the cms to test remote triggers controller.on('message', async(bot, message) => { await controller.plugins.cms.testTrigger(bot, message); });

Any help appreciated !

dhgokul avatar Oct 05 '20 15:10 dhgokul

I just got it working by doing the following:

settings some .env params in CMS and Botkit

in CMS, set PLATFORM=web set USERS="username:password" set TOKENS="token" set PORT=3001

in Botkit, set CMS_URI=http://localhost:3001 set CMS_TOKEN=token

now run both projects.

keep in mind that you will need to restart Botkit server after saving changes in CMS

kareemgdiab avatar Oct 09 '20 14:10 kareemgdiab

@kareemgdiab Thanks for your response! Still we get same interconnection issue

dhgokul avatar Oct 12 '20 07:10 dhgokul