@lamware/sst
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published
NPM Discord Apache-2.0

Lamware - SST

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 };

Package Sidebar

Install

npm i @lamware/sst

Weekly Downloads

31

Version

1.0.0

License

GPL-3.0-only

Unpacked Size

38.4 kB

Total Files

7

Last publish

Collaborators

  • oyed