Created
August 18, 2016 09:59
-
-
Save rotemtam/69fe5a0dda9c646edd7fcf0d98c0da14 to your computer and use it in GitHub Desktop.
Example Lambda with Lambda Runner
This file contains hidden or 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'; | |
const LambdaRunner = require('co-lambda-runner') | |
, DB = require('./db'); | |
function *main(e) { | |
let id = e.params.id; | |
return yield DB.get(id); | |
} | |
module.exports = LambdaRunner(main); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment