Search code examples
javascriptnode.jshardwareramdisk

Is there any way to an app in node.js know how much ram has the computer?


I am making an application in node.js and I need to know how much ram is installed on the computer NOT TOTAL USE. If you know of other ways to find out more about the hardware, like the type of disk and how much space is available and its total, I'd like to hear you. Thank you.


Solution

  • You can get this information directly, but you likely would want to rely on a package to simply the task.

    You may want to look at systeminformation from NPM.

    • si.mem(...) to get memory information (total, for example).
    • si.diskLayout(...) for disk information, etc..