Create your own Hubot (1) - Install Node.js and npm

Apr 4, 2017 Hubot 中文版

Hubot is a handy and useful automation tool (framewrok) introduced by Github. To increase productivity, you can integrate it with other services such as Google Map, Skype and Slack. I will use three posts to introduce you how to create and use your own Hubot with Slack. This first post is about how to set up the environment for running Hubot.



Prerequisite

I will demonstrate the following steps on Debian, so let’s update the package manager and install one necessary package.

# Update Debian's package manager
apt-get update

# Install cUrl
apt-get -y install curl


Install Node.js and npm

Normally, you would get an outdated version of Node.js and npm by simply executing apt-get install -y nodejs. To get newer versions, we can execute below commands:

# Install Node.js 6.X
curl -sL https://deb.nodesource.com/setup_6.x | bash -
apt-get -y install nodejs

# Install Node.js 7.X
curl -sL https://deb.nodesource.com/setup_6.x | bash -
apt-get -y install nodejs


Check versions of Node.js and npm

To make sure Node.js and npm were installed correctly on your machine, you can execute the following command:

# Check Node.js version
nodejs -v

# Check npm version
npm -v

The next post will show you how I install and set up a Hubot.


You might also like:




If you have any suggestions, questions or even find some typos, feel free to contact me. Thank you! :)

zeckli.devforgalaxy@gmail.com   © 2015-2019 zeckli, thanks to Jekyll and GitHub.