1.0.0 • Published 2 years ago
@lamware/sst v1.0.0
This Lamware Middleware wraps your Lambda Function using the SST API Handler, allowing the SST runtime hooks to work with their dependency injection.
Installation
This package is available via NPM:
yarn add @lamware/sst
# or
npm install @lamware/sst
Usage
import type { APIGatewayProxyHandlerV2 } from 'aws-lambda';
import { useJsonBody } from 'sst/node/api';
import { lamware } from '@lamware/core';
import { sst } from '@lamware/sst';
const { handler } = lamware<APIGatewayProxyHandlerV2>()
.use(sst())
.execute(async () => {
const json = useJsonBody();
return { statusCode: 200 };
});
export { handler };
1.0.0
2 years ago