Deploy and serve your Remix website from Fastly's blazing-fast Compute.
NEW! This is for version 2 of Remix. If you need to use Remix version 1, then use @fastly/remix-compute-js@3.
Remix is a popular JavaScript-based full stack web framework that is designed to allow the developer to focus on the user interface and work back through web standards to deliver a fast, slick, and resilient user experience.
The easiest way to get up and running is to use Remix's CLI to
initialize your project, specifying https://github.com/fastly/remix-compute-js/tree/main/packages/remix-template
as
the template. See using the template below.
If you already have a Remix application that you'd like to move to Fastly Compute, see MIGRATING.md.
Once you have initialized your project, start the application:
npm run dev
You can browse your shiny new application at http://127.0.0.1:7676!
To deploy your project to Fastly, use the following commands:
npm run build
npm run deploy
For more details, see the README file of remix-template.
This monorepo contains three projects:
-
A runtime that implements the interfaces defined in
@remix-run/server-runtime
. Allows the Remix framework to run on Fastly Compute. -
An adapter that allows the Compute JavaScript entry point program to start Remix.
-
A template to be used with
remix create
to initialize a Remix application. The template is configured with the above libraries so that it is able to run on Fastly Compute.
Initialize your new Remix application by running the following:
npm create remix@latest ./new-app-js -- --template https://github.com/fastly/remix-compute-js/tree/main/packages/remix-template
Out of the box, this library does not use Webpack or polyfills to work under Fastly Compute. There are cases where you may still want to use Webpack, such as if you want to replace global modules or use polyfills. For details, see "Module bundling" in the template's README.
If you encounter any non-security-related bug or unexpected behavior, please file an issue using the bug report template.
Please see our SECURITY.md for guidance on reporting security-related issues.
MIT.