Skip to Content
Practical Internet of Things with JavaScript
book

Practical Internet of Things with JavaScript

by Arvind Ravulavaru
December 2017
Intermediate to advanced
296 pages
5h 56m
English
Packt Publishing
Content preview from Practical Internet of Things with JavaScript

MQTTS broker - Mosca

In this section, we are going to put together the MQTTS broker. We are going to use Mosca (http://www.mosca.io/) as a standalone service (https://github.com/mcollina/mosca/wiki/Mosca-as-a-standalone-service).

Create a new folder named chapter2. Inside the chapter2 folder, create a new folder named broker and open a new command prompt/terminal inside the folder. Then run the following:

npm install mosca pino -g  

This will install Mosca and Pino globally. Pino (https://github.com/pinojs/pino) is a Node.js logger, which logs all the messages to the console thrown by Mosca.

Now, the default version of Mosca implements MQTT. But we want to secure our communication between the smart device and cloud to avoid man-in-the-middle ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Test-Driving JavaScript Applications

Test-Driving JavaScript Applications

Venkat Subramaniam
Web Caching and Replication

Web Caching and Replication

Michael Rabinovich, Oliver Spatscheck

Publisher Resources

ISBN: 9781788292948Supplemental Content