Installing the GatewayHub with NPM

Installing the GatewayHub with NPM

We begin the new year with a small improvement on the GatewayHub. We decided to publish the GatewayHub on NPM in order to make its installation easier.






Note: If you don't know what the GatewayHub is, we recommend that you start by reading this post: A gateway to remotely access YoctoHubs.

Until now, to install and update the GatewayHub, you had to download the latter from our web site, unzip the archive, and potentially add it to the PATH. Although these steps were not overwhelming, we thought that it would be even simpler if you could install the GatewayHub directly from NPM.

So we published the GatewayHub on the NPM package manager.

You can now install it on a machine with the help of the following command:

sudo npm install gatewayhub -g



NPM takes care to download and install the latest version of the GatewayHub as well as all the packages it requires. The -g option enables you to globally install the GatewayHub and to add it to the PATH.

This way, you can directly run the GatewayHub from any directory:

c:\tmp> gatewayhub ....



Note that under Windows, the command is even simpler as you don't need to use sudo:

npm install gatewayhub -g



The installation is easier than with a traditional zip file that you had to extract and install, but the use of NPM also simplifies the installation of updates later on. Indeed, the npm update command allows you to update the GatewayHub but also the packages it is dependent upon.

npm update gatewayhub -g



Finally, if for one reason or another you want to uninstall the GatewayHub, you can do so with the following command:

sudo npm uninstall gatewayhub -g



In a nutshell, this improvement is not revolutionary, but it makes easier the life of the GatewayHub users.

Add a comment No comment yet Back to blog












Yoctopuce, get your stuff connected.