1.0.0 • Published 3 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/sstUsage
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
3 years ago