mirror of
https://github.com/openfaas/faas.git
synced 2025-06-08 08:25:03 +00:00
Update nodeinfo with content-type
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
parent
b74cd09fa1
commit
52a42afbf6
@ -10,6 +10,7 @@ module.exports = async (event, context) => {
|
||||
let res = await info(content)
|
||||
return context
|
||||
.status(200)
|
||||
.headers("Content-Type", "text/plain")
|
||||
.succeed(res)
|
||||
}
|
||||
|
||||
@ -18,9 +19,10 @@ async function info(content, callback) {
|
||||
|
||||
let val = "";
|
||||
val += "Hostname: " + data +"\n";
|
||||
val += "Platform: " + os.platform()+"\n";
|
||||
val += "Arch: " + os.arch() + "\n";
|
||||
val += "CPU count: " + os.cpus().length+ "\n";
|
||||
val += "Total mem: "+ os.totalmem() + "\n";
|
||||
val += "Platform: " + os.platform()+"\n";
|
||||
|
||||
val += "Uptime: " + os.uptime()+ "\n";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user