OS module is a native Node module giving you access to operating system information like memory, architecture, uptime and many more.
#node#module
constos=require('os');// Node native modulefunctionlogOsData(){console.log(`Architecture: ${os.arch()}`);console.log(`Total memory: ${os.totalmem()}`);console.log(`Free memory: ${os.freemem()} `);console.log(`Platform: ${os.platform()} `);console.log(`Type: ${os.type()} `);console.log(`Uptime: ${os.uptime()} `);// Uncomment the line below to log full OS object in the console.// console.log(os); }logOsData();