• A Simple and Basic Code to Get PC Memory Using NodeJS Then Convert from MB to FB

     


    Display OS Memory Using NodeJS - Convert MB to GB 

    This simple code is to display a basic output from OS free memory using NodeJS, and then output it into the console.log() terminal, take note that I am using VS Code Here so if you wanted to try you can use that text editor or you can use your own.

    Documentation of OS in Node can be found on their website which you can also go here. for the JS Source Code, you can get it here. (You will get the full functionality of it including the Functions that will convert the Megabytes into GigaBytes).



    This Simple coding is just documentation for my NodeJS journey, and I also do JavaScript/ReactJs/Express Journey and also Laravel which will soon be displayed on this small basic blog site of mine.

    Basic Code to Display OS.FreeMEM():

    const os = require('node:os');
    console.log(os);
    const totalMemory = os.totalmem();
    console.log(`TOTAL MEMORY: ${totalMemory} MB`);

  • 0 comments:

    Post a Comment

    GET A FREE QUOTE NOW

    I am flexible and would like to work with you long term, and currently I am looking for a fulltime job with a long term opportunity, but able to work also part-time, get free qoute for project.

    Search This Blog

    Powered by Blogger.

    Mga Pahina

    ADDRESS

    Purok 5-A, Brgy. Magdum, Tagum City 8100, Davao del Norte, Philippines

    EMAIL

    gransebryan@gmail.com
    bryanworkdevs@gmail.com