This will take filePath as a function parameter and reads the file via fs module and get the file and converts it's size into more humanly readable format.
const fs = require('fs');
function getFileSize(filename) {
  const stats = fs.statSync(filename);
  //console.log('stats', stats);
 const {size} = stats;