next-aws-cloudfront
TypeScript icon, indicating that this package has built-in type declarations

1.3.1-alpha.1 • Public • Published

Next AWS CloudFront

Compat layer between next.js serverless page and CloudFront => Lambda@Edge.

Lambda@Edge event structure documentation can be found here.

Installation

npm install next-aws-cloudfront

Usage

const cloudFrontCompat = require("next-aws-cloudfront");
const page = require(".next/serverless/pages/somePage.js");

module.exports.render = async (event, context) => {
  const { req, res, responsePromise } = cloudFrontCompat(event.Records[0].cf);
  page.render(req, res);
  return responsePromise;
};

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.3.1-alpha.1239latest

Version History

VersionDownloads (Last 7 Days)Published
1.3.1-alpha.1239
1.3.1-alpha.02
1.3.066
1.3.0-alpha.02
1.2.02
1.2.0-alpha.12
1.2.0-alpha.02
1.1.12
1.1.02
1.1.0-alpha.02
1.0.12

Package Sidebar

Install

npm i next-aws-cloudfront

Weekly Downloads

323

Version

1.3.1-alpha.1

License

ISC

Unpacked Size

25.3 kB

Total Files

8

Last publish

Collaborators

  • danielconde