4.1.0 • Published 2 years ago

@dolsze/next-aws-lambda v4.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

API Gateway Lambda Compat

Compat layer between next.js serverless page and API Gateway => Lambda Proxy Integration.

Lambda Proxy Integration event structure documentation can be found here.

Installation

npm install @dolsze/next-aws-lambda

Usage

const compat = require("@dolsze/next-aws-lambda");
const page = require(".next/serverless/pages/somePage.js");

// using callback

module.exports.render = (event, context, callback) => {
  compat(page)(event, context, callback);
};

// using async promise

module.exports.render = async (event, context) => {
  const responsePromise = compat(page)(event, context); // don't pass the callback parameter
  return responsePromise;
};
4.1.0

2 years ago

1.2.3

2 years ago

1.1.11

2 years ago

1.1.6

2 years ago

1.0.9

2 years ago