Skip to content
Permalink
Browse files

Try a simple lambda

This is essentially to test the webpack compilation
  • Loading branch information...
rricard committed Nov 22, 2015
1 parent 8ee9824 commit cfb1b6d3bad6e70c99eea1903e6a0163e27fc0db
Showing with 19 additions and 0 deletions.
  1. 0 lambdas/.gitkeep → .flowconfig
  2. +10 −0 bin/try-hello.js
  3. +9 −0 lambdas/hello.js
File renamed without changes.
@@ -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);
@@ -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.
You can’t perform that action at this time.