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

Communication between broker and API engine

Now that we are done with the two pieces of software on the cloud, we will be interfacing them. In api-engine/server/config/environment/development.js, we have defined the broker IP and port that the api-engine needs to connect to.

Later on, if we deploy these two pieces on different machines, this is the place where we update the IP and port so the api-engine refers to the broker.

Now, to test the communication, cd into chapter2/broker folder and run the following:

mosca -c index.js -v | pino  

And we should see the following:

Next, open a new command prompt/terminal, cd into chapter2/api-engine ...

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