Adjust documentation

Allow content-type for UI
This commit is contained in:
Alex Ellis
2017-01-31 17:30:42 +00:00
parent f2a1c75cb7
commit cb807d2fa9
9 changed files with 456 additions and 378 deletions

View File

@ -1,7 +1,19 @@
'use strict'
let os = require('os');
let fs = require('fs');
const getStdin = require('get-stdin');
getStdin().then(content => {
console.log(os.platform(), os.arch(), os.cpus(), os.uptime(), os.userInfo());
});
getStdin().then((content) => {
fs.readFile("/etc/hostname", "utf8", (err, data) => {
console.log("Hostname: " + data);
console.log("Platform: " + os.platform());
console.log("Arch: " + os.arch());
console.log("CPU count: " + os.cpus().length);
console.log("Uptime: " + os.uptime())
console.log("User info: " + os.userInfo());
if (content && content.length && content.indexOf("verbose") > -1) {
console.log(os.cpus());
}
});
});