remix-alb-adapter
v0.3.0
Published
Remix Adapter for ALB on AWS
Downloads
855
Readme
remix-alb-adapter
An adapter that allows you to integrate your Remix application with AWS ALB.
It works similar to the @remix-run/architect
and transforms the ALB event into requests that can be handled by Remix.
Usage
Checkout the example
.
It adds a server.ts function that uses the adapter, adds an esbuild step to build your application and that's it.
// server.ts
import { createRequestHandler } from "remix-alb-adapter";
import * as build from "./build";
export const handler = createRequestHandler({
build,
getLoadContext(event) {
// use lambda event to generate a context for loaders
return {};
},
});
To create the build output first run npx remix build
and afterward run esbuild.
You can deploy the build output to your lambda and host the static content however you want.