Skip to content

Instantly share code, notes, and snippets.

@rotemtam
Created August 18, 2016 09:59
Show Gist options
  • Save rotemtam/69fe5a0dda9c646edd7fcf0d98c0da14 to your computer and use it in GitHub Desktop.
Save rotemtam/69fe5a0dda9c646edd7fcf0d98c0da14 to your computer and use it in GitHub Desktop.
Example Lambda with Lambda Runner
'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