Prints total and free memory using OS built-in module:
const os = require('os')

let totalMemory = os.totalmem()
let freeMemory = os.freemem()

console.log(`Total memory: ${totalMemory}`)
console.log(`Free memory: ${freeMemory}`)
by Valeri Tandilashvili
2 years ago
Node
Node.js Tutorial for Beginners - 1 Hour
0
Pro tip: use ```triple backticks around text``` to write in code fences