https://github.com/ctrlplusb/remix-aws-edge
An adapter for running Remix on AWS CloudFront Lambda@Edge
https://github.com/ctrlplusb/remix-aws-edge
Last synced: 6 months ago
JSON representation
An adapter for running Remix on AWS CloudFront Lambda@Edge
- Host: GitHub
- URL: https://github.com/ctrlplusb/remix-aws-edge
- Owner: ctrlplusb
- Created: 2022-06-03T12:55:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-03T13:29:30.000Z (over 3 years ago)
- Last Synced: 2025-06-18T14:55:49.197Z (7 months ago)
- Language: TypeScript
- Size: 65.4 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# remix-aws-edge
An adapter to run Remix on AWS CloudFront Lambda@Edge.
---
- [Introduction](#introduction)
- [Installation](#installation)
- [Configuring your Remix project](#configuring-your-remix-project)
- [Appreciation](#appreciation)
---
## 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;
```bash
npm install @remix-run/node
```
Then install this package;
```bash
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;
```javascript
import { createRequestHandler } from "remix-aws-edge";
exports.handler = createRequestHandler({
build: require("./build"),
});
```
---
## Appreciation
This code was adapted from work performed by [@ajhaining](https://github.com/ajhaining), within his [remix-cloudfront-cdk-example](https://github.com/ajhaining/remix-cloudfront-cdk-example) project.