Using canvas-gauges package with Node-Red

Solution:

  1. create a new folder...I created node-red-static in the same folder as node-modules...but it could be anywhere.

  2. put the .js file in that folder...or if you can make another folder and put it there.

  3. in setting.js add the path to this folder in httpStatic:

httpStatic: '/config/node-red/node-red-static/',

  1. then in your template, include the following line:
<script src="http://192.168.254.201:1881/gauge.min.js"></script>
where gauge.min.js is the name of your js file and the url is your url.  
  1. Test to see if you installed it correctly.....http://192.168.254.201:1881/gauge.min.js should show you the javascript file.
2 Likes