Skip to content

Commit

Permalink
Try a simple lambda
Browse files Browse the repository at this point in the history
This is essentially to test the webpack compilation
  • Loading branch information
rricard committed Nov 22, 2015
1 parent 8ee9824 commit cfb1b6d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
File renamed without changes.
10 changes: 10 additions & 0 deletions bin/try-hello.js
@@ -0,0 +1,10 @@
var helloModule = require("../dist/hello.js");

var fakeLambdaContext = {
succeed: function succeed(results) {
console.log(results);
process.exit(0);
}
};

helloModule.hello({name: "bob"}, fakeLambdaContext);
9 changes: 9 additions & 0 deletions lambdas/hello.js
@@ -0,0 +1,9 @@
/* @flow */

type HelloOptions = {
name: string
};

export function hello(options: HelloOptions, context: any): void {
context.succeed(`Hello ${options.name || "world"}!`);
}

0 comments on commit cfb1b6d

Please sign in to comment.