There are a few different methods you can use to accomplish this. Just keep in mind that I have been doing a lot of reading lately on Node.js( the last year or so ), but I am no expert.
First if the input you’re reading is accessible via sysfs, you can use process.exec( I think it is ) to read the value into a javascript variable to display on the webpage.
Secondly, I believe you could write an app that reads the value( perhaps using mmap ), and puts it into a “file” in memory, then use process.exec( again ) to cat the value into a javascript variable much like the above approach.
Anyway, there are surely other options and the two I mentioned above may / may not be the best approach. This is just something that I’ve been researching myself for the last year or so in my spare time “wondering” How I personally could achieve a similar goal.
There are security issues to contend with as well. The second option above may be the best I mentioned as the app could be made to run under root privileges, while the Node.js app could be given read privileges to this so called file in memory( while running as a regular user ). This native app could then be made to fire off at a certain interval, while the Node.js app could be made to read the values out at a multiple of the time interval. OR, Node.js has a FileWatcher Class method that fires off when a file changes. . .
Anyway, this is why I personally like Node.js so much as it is object oriented / event driven, with a lot of meat to it. It is also non blocking, and very fast. Lots to like . . . Good luck.