Last active
April 19, 2017 06:56
-
-
Save paulopatto/27d3afea4d44de38f4ac70959685bc0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
console.log('Loading function'); | |
exports.handler = (event, context, callback) => { callback(null, event); }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
console.log('Starting FaaS:fn '); | |
exports.handler = (event, context, callback) => { | |
const MIN_VALUE = 0; | |
const MAX_VALUE = 10; | |
const generatedNumber = Math.floor( Math.random() * MAX_VALUE ) + MIN_VALUE; | |
/** | |
* fn:callback -> $err , $succ | |
* | |
* $err => error message | |
* $succ => success return | |
*/ | |
callback( null, generatedNumber ); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment