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

2.0.1 • Public • Published
NPM Discord Apache-2.0

Lamware - Warmer

This Lamware Middleware utilizes the lambda-warmer package, automating usage of it by providing:

  • Automatically registering the warming listener
  • Early-exit out of your Function if it detects a warming event

Installation

This package is available via NPM:

yarn add @lamware/warmer

# or

npm install @lamware/warmer

Usage

import type { APIGatewayProxyHandlerV2 } from 'aws-lambda';
import { warmer } from '@lamware/warmer';
import { lamware } from '@lamware/core';

const { handler } = lamware<APIGatewayProxyHandlerV2<any>>()
  .use(warmer())
  .execute(async () => {
    return { statusCode: 200 };
  });

export { handler };

Package Sidebar

Install

npm i @lamware/warmer

Weekly Downloads

10

Version

2.0.1

License

GPL-3.0-only

Unpacked Size

39.4 kB

Total Files

7

Last publish

Collaborators

  • oyed