Last active
February 27, 2020 15:01
-
-
Save mtimbs/965bde6e3d829e3e3417c6d2a44c84ac to your computer and use it in GitHub Desktop.
example API Gateway handler for serverless framework using module aliasing for imports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { APIGatewayProxyHandler } from ‘aws-lambda'; | |
import { echo } from ‘@queries/exampleQuery'; | |
import 'source-map-support/register’; | |
export const hello: APIGatewayProxyHandler = async (event) => ({ | |
statusCode: 200, | |
body: JSON.stringify({ | |
message: echo(‘Module aliasing is really the best’), | |
input: event, | |
}, null, 2), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment