Every time when i started hubot, i have to do the following first before bin/hubot -a rocketchat? Why is that?
export ROCKETCHAT_USER=bot
export ROCKETCHAT_PASSWORD=bot
export ROCKETCHAT_AUTH=password
Also I did install redis and hubot-redis-brain, and from the following info i got when i log in hubot, the adapter did connect to redis:
[Wed Oct 19 2016 02:44:24 GMT+0000 (UTC)] INFO hubot-redis-brain: Using default redis on localhost:6379
[Wed Oct 19 2016 02:44:24 GMT+0000 (UTC)] INFO hubot-redis-brain: Data for hubot brain retrieved from Redis
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The lines before are environment variables. We use this to pass important information to the adapter so it knows how to connect to Rocket.Chat. Adding redis or redis brain doesn’t give the bot the ability to remember this.
So a common solution here would be to make use of a bash file. So create a file like start_hubot with contents like this:
#!/bin/bash
export ROCKETCHAT_USER=bot
export ROCKETCHAT_PASSWORD=bot
export ROCKETCHAT_AUTH=password
export HUBOT_YOUTUBE_API_KEY=<your token>
bin/hubot -a rocketchat
Then to make it executable run: chmod +x start_hubot
So then when you want to run hubot you can just do: ./start_hubot
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.