remix-aws-edge
v0.1.0
Published
An adapter to run Remix on AWS CloudFront Lambda@Edge
Downloads
6
Maintainers
Readme
remix-aws-edge
An adapter to run Remix on AWS CloudFront Lambda@Edge.
Introduction
This project exports a utility allowing you to initialise a server side request handler for Remix with the intention of being utilised against an AWS CloudFront Lambda@Edge.
Installation
Firstly, ensure you have the required peer dependencies installed;
npm install @remix-run/node
Then install this package;
npm install remix-aws-edge
Configuring your Remix project
Create a server/index.js
file in the root of your Remix project with the following contents;
import { createRequestHandler } from "remix-aws-edge";
exports.handler = createRequestHandler({
build: require("./build"),
});
Appreciation
This code was adapted from work performed by @ajhaining, within his remix-cloudfront-cdk-example project.