new App(event, context, fileExtensionopt) → {Promise}
App entry point
Creates new Request and Response objects.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
event |
object | AWS event |
||
context |
object | AWS context |
||
fileExtension |
string |
<optional> |
js |
Returns:
Promise object with statusCode, body and headers
- Type
- Promise
Example
// Lambda in AWS SAM templte
import { App } from 'deeserverless';
export const lambdaHandler = async (event, context) => {
return new App(event, context);
}