Version 23 (modified by 8 years ago) (diff) | ,
---|
Using RaspberryPI's for Creating an Interesting Slackbot
Install Node.js and NPM
It is always a good idea to the upgrade and update before adding packages after the initial installation of the OS on the PI.
sudo apt-get upgrade sudo apt-get update
You might need to removed the old nodered, which might not be the package we want
sudo apt-get remove nodered sudo apt-get remove nodejs nodejs-legacy sudo apt-get remove npm
And then get the latest node source and install
curl -sL https://deb.nodesource.com/setup_4.x | sudo bash - sudo apt-get install -y build-essential python-dev nodejs
npm seems to come with nodejs. When trying to do an apt-get install npm, I get an error. Running with
node --version v4.4.5 npm --version 2.15.5
Here is an alternate way to install, but the above method seemed to work.
wget http://node-arm.herokuapp.com/node_latest_armhf.deb sudo dpkg -i node_latest_armhf.deb
Follow This Tutorial
https://scotch.io/tutorials/building-a-slack-bot-with-node-js-and-chuck-norris-super-powers
https://github.com/michikono/slackbot-tutorial
http://www.michikono.com/2015/07/10/in-depth-tutorial-on-writing-a-slackbot/
Useful Pages to Read
Node.js
https://nodejs.org/api
http://nodeschool.io/#workshopper-list
NPM
https://www.sitepoint.com/beginners-guide-node-package-manager/
Coffee - the little language that compiles into Javascript
HUBOT Tutorial
https://www.sitepoint.com/spice-up-your-slack-channel-with-hubot/
It gives the most basic commands - none of the addons. I found that the hubot-catme section does work.
https://github.com/github/hubot/blob/master/docs/scripting.md
https://github.com/Emile-Filteau/hubot-catme/blob/master/src/catme.coffee
https://nodejs.org/api/http.html#http_class_http_serverresponse
Attachments (3)
-
Screen Shot 2016-06-14 at 4.05.46 PM.png (343.0 KB) - added by 8 years ago.
Rabbithain functionality 1
-
Screen Shot 2016-06-14 at 4.06.06 PM.png (392.5 KB) - added by 8 years ago.
Rabbithain functionality 2
-
Screen Shot 2016-06-14 at 4.09.13 PM.png (388.9 KB) - added by 8 years ago.
Rabbithain functionality 3
Download all attachments as: .zip