Node JS, Read CPU temperature
Simple web search will return a bunch of nodeJS packages for tracking CPU temperature. For example https://github.com/sebhildebrandt/systeminformation
Have not tested it, but does look like something you would be looking for.
Case you are running linux it can be:
Create a file called "temp.js" and insert below code:
var spawn = require('child_process').spawn;
temp = spawn('cat', ['/sys/class/thermal/thermal_zone0/temp']);
temp.stdout.on('data', function(data) {
console.log('Result: ' + data/1000 + ' degrees Celcius');
});
in console run:
node temp.js
Result should be something like below:
Result: 46.16 degrees Celcius
Here you have a NPM package for CPU temp as well as other statistics:
https://www.npmjs.com/package/systeminformation
The package is well documented, and will tell you exactly what to do. Otherwhise, it's easy just to google the error codes or other problems that you might encounter.