remix-alb-adapter
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

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.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i remix-alb-adapter

Weekly Downloads

244

Version

0.3.0

License

MIT

Unpacked Size

63.3 kB

Total Files

10

Last publish

Collaborators

  • kruspe