Skip to content

Commit

Permalink
Added info.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogelio-o committed Dec 23, 2017
1 parent a00d215 commit 4ba37c6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,36 @@ AWS Lambda implementation of Lambda Framework.

## How to use it?

TODO
### Creating the AWS Lambda handler

```typescript
import { App, IApp } from "lambda-framework";
importAWSHandler } from "lambda-framework-aws";

const app: IApp = new App();
...
export.handler = AWSHandler(app);
```

### Using S3 to retrieve the templates

```typescript
import { App, IApp } from "lambda-framework";
importAWSHandler, S3TemplateLoader } from "lambda-framework-aws";
import DustTemplateRenderer from "lambda-framework-dustjs";

const app: IApp = new App();
...
const cachedTime: number = 3000;
const templateRenderer: ITemplateRenderer = new DustTemplateRenderer(new S3TemplateLoader("bucket-name", cachedTime));
app.addTemplateEngine(templateRenderer);
...
```

### More info

If you want to know more about how to use App, please visit
the [Core Project](https://github.com/rogelio-o/lambda-framework).

## Lambda Framework projects

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
* MIT Licensed
*/

export { default } from "./lib/AWSHandler";
export { default as AWSHandler } from "./lib/AWSHandler";
export { default as AWSTransformer } from "./lib/AWSTransformer";
export { default as S3TemplateLoader } from "./lib/S3TemplateLoader";

0 comments on commit 4ba37c6

Please sign in to comment.