Javascript

This guide provides a walk-through of how to install the latest version of Node.JS along with the MQTT Client library.

Installing Node.JS

Enable the NodeSource repository by running the following command in your terminal:

curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -

Once the repository is enabled, install Node.js and npm by running the following command:

sudo apt install nodejs

To verify the installation, run the following command:

node --version

Installing MQTT Client

This documentation uses MQTT.js as a client library.

Install the library by running the following command:

npm install mqtt --save

Connect Device

Start connecting devices by following the guide :