https://www.fastly.com/blog/host-your-remix-app-on-fastly-compute-edge
Install the Fastly CLI
- On Linux, run
dpkg --print-architecture
to find your architecture. We gotamd64
. - Visit the Fastly releases page to download the correct
*.deb
file. - Right-click "Copy link address" from the browser and run
wget https://github.com/fastly/cli/releases/download/v10.2.4/fastly_10.2.4_linux_amd64.deb
apt install ./fastly_10.2.4_linux_amd64.deb
fastly version
to confirm installation
npx create-remix@latest ./my-app --template https://github.com/fastly/remix-compute-js/tree/main/packages/remix-template
- Run dev server:
npm run dev
- Build and run production server:
npm run build && npm run start
- Generate a Fastly API token: Fastly CLI usage
- Navigate to Account > API tokens
- Create a
user
token withGlobal API access
. - Create a Fastly CLI profile:
fastly profile create
- Build and deploy to Fastly:
npm run build && npm run deploy
. You can accept all of the CLI's defaults.