mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Blog API example (#377)
This commit is contained in:
10
examples/apps/hellos/node/func.js
Normal file
10
examples/apps/hellos/node/func.js
Normal file
@@ -0,0 +1,10 @@
|
||||
fs = require('fs');
|
||||
|
||||
name = "do you speak node?";
|
||||
try {
|
||||
obj = JSON.parse(fs.readFileSync('/dev/stdin').toString())
|
||||
if (obj.name != "") {
|
||||
name = obj.name
|
||||
}
|
||||
} catch(e) {}
|
||||
console.log("Hello, " + name);
|
||||
Reference in New Issue
Block a user