mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
more tutorial
This commit is contained in:
9
examples/tutorial/hello/node/func.js
Normal file
9
examples/tutorial/hello/node/func.js
Normal file
@@ -0,0 +1,9 @@
|
||||
name = "World";
|
||||
fs = require('fs');
|
||||
try {
|
||||
obj = JSON.parse(fs.readFileSync('/dev/stdin').toString())
|
||||
if (obj.name != "") {
|
||||
name = obj.name
|
||||
}
|
||||
} catch(e) {}
|
||||
console.log("Hello", name, "from Node!");
|
||||
Reference in New Issue
Block a user