New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

remix-lambda-at-edge

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-lambda-at-edge

Lambda@Edge adapter for Remix

latest
Source
npmnpm
Version
0.4.4
Version published
Weekly downloads
10
25%
Maintainers
1
Weekly downloads
 
Created
Source

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
});

FAQs

Package last updated on 22 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts