mirror of
https://github.com/openfaas/faas.git
synced 2025-06-21 00:06:38 +00:00
Adjust documentation
Allow content-type for UI
This commit is contained in:
@ -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());
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user