Skip to content

Instantly share code, notes, and snippets.

@montanaflynn
Created October 21, 2014 11:18
Show Gist options
  • Save montanaflynn/f1c695bcf874747be9b9 to your computer and use it in GitHub Desktop.
Save montanaflynn/f1c695bcf874747be9b9 to your computer and use it in GitHub Desktop.
Node.js host operating system info
var os = require('os')
var response = {}
for (property in os) {
if (typeof os[property] === 'function') {
response[property] = os[property]()
} else {
response[property] = os[property]
}
}
console.log(JSON.stringify(response,null,2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment