Neutered Puppy Masquerade

    remix-lambda-at-edge
    TypeScript icon, indicating that this package has built-in type declarations

    0.4.3 • Public • Published

    Remix Adapter for CloudFront Lambda@Edge

    Package was originally forked from https://github.com/ajhaining/remix-lambda-at-edge but deployed to npm as its own package after failing to get in contact with the original author

    This adapter transforms CloudFront Origin Request Events into Web Fetch API Request and Response objects using the adapter convention set out in the Remix Docs.

    Usage

    import { createRequestHandler } from "remix-lambda-at-edge";
    
    export const handler = createRequestHandler({
      getBuild: () => require("./build"),
      getLoadContext: event => {
        // access to raw CloudFront event to provide context to loaders
      },
      // mode?: string; development or production, defaulted to NODE_ENV 
      // originPaths?: (string | RegExp)[]; set of paths returned to cloudfront to lookup in S3 instead
      // onError?: (e: Error) => void; method called if remix fails to handle the request for any reason
      // debug?: boolean; add extra logging to cloudfront, defaults to false
    });

    Keywords

    none

    Install

    npm i remix-lambda-at-edge

    DownloadsWeekly Downloads

    190

    Version

    0.4.3

    License

    none

    Unpacked Size

    10.2 kB

    Total Files

    9

    Last publish

    Collaborators

    • dvargas92495