Remix framework starter

Starter for Remix JavaScript framework

Platform:
Fastly Compute
Language:
JavaScript
Repo:
https://github.com/fastly/compute-starter-kits/tree/main/starter-kits/javascript/remix

Use this starter

Using the Fastly CLI, create a new project using this starter somewhere on your computer:

$ fastly compute init --from=starter-kit/javascript/remix

Development

Prerequisites:

  • Node >= 16.13

You will be running two processes during development:

Both are started with one command:

npm run dev

Open up http://127.0.0.1:7676 and you should be ready to go!

Changes made to files in app/ will cause the Remix application to rebuild and then trigger a live reload. The live refresh occurs automatically 5000ms after the rebuild. If this delay is too short, you can configure this using the devServerBroadcastDelay value in remix.config.js and then restart npm run dev.

If you want to check the production build, you can stop the dev server and run following commands:

npm run build
npm start

Then refresh the same URL in your browser (no live reload for production builds).

Deployment

If you don't already have an account, then create a Fastly Compute account here.

Once that's done, you should be able to deploy your app:

npm run build
npm run deploy

Next steps

Starters are a good way to bootstrap a project. For more specific use cases, and answers to common problems, try our library of code examples.