next-aws-compat

1.0.0 • Public • Published

API Gateway Lambda Compat

Compat layer between Next.js serverless page and AWS/Yandex.Cloud Api Gateway => Lambda/Serverless functions Proxy integration.

Lambda Proxy Integration event structure documentation can be found here.

This is a fork of next-aws-lambda

Installation

npm install next-aws-compat

Usage

const compat = require("next-aws-compat");
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;
};

/next-aws-compat/

    Package Sidebar

    Install

    npm i next-aws-compat

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    5.82 kB

    Total Files

    4

    Last publish

    Collaborators

    • famence