In earlier article, we looked at how to install node and NVM into our linux development environment.
In this article, we will be looking how to call our nodeJS script to get some info about our OS in Linux.
With following command nodeJS module lets us execute JS script in Linux.
var os=require('os');
os.loadavg()
os.freemem();
os.totalmem();
Lets see in bash shell example in Linux.
In above example, we called a basic nodeJS script with node that outputs a string text indicating free OS memory in our Linux development environment.