Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Integrate botkit web with botkit CMS tool #62

Open
dhgokul opened this issue Oct 5, 2020 · 2 comments
Open

Integrate botkit web with botkit CMS tool #62

dhgokul opened this issue Oct 5, 2020 · 2 comments

Comments

@dhgokul
Copy link

dhgokul commented Oct 5, 2020

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 !

@kareemgdiab
Copy link

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

@dhgokul
Copy link
Author

dhgokul commented Oct 12, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants