Remix apps now run natively on full-stack Cloudflare Pages

Cloudflare has extended its full-stack Pages platform to support Remix, the newest framework to take advantage of serverless functions powered by Cloudflare Workers. Remix joins SvelteKit as one of two frameworks with native integration since the platform’s full-stack open beta launched in November.

Remix was built around the same philosophy that drives Cloudflare Workers: use the web platform’s native APIs rather than reimplementing them. The framework leans on modern JavaScript APIs and puts weight on web fundamentals like HTTP status codes, caching, and performance optimization. Remix also ships with a platform-agnostic interface and adapters, so applications can be deployed to a range of providers. But on Cloudflare Workers, Remix runs without any adapter layer at all.

One of the main inspirations for Remix was the way Cloudflare Workers uses native web APIs for handling HTTP requests and responses. It's a brilliant decision because developers are able to reuse knowledge on the server that they gained building apps in the browser! Remix runs natively on Cloudflare Workers, and the results we've seen so far are fantastic.Michael Jackson, CEO at Remix

That native compatibility has practical benefits beyond developer familiarity. Because Remix apps run on Workers, there’s no Node.js process to manage on a remote server; requests are handled directly at the edge across Cloudflare’s 250+ locations. That architecture eliminates the runtime mapping between Node.js and the Fetch API, and puts 95% of internet-connected users within 50ms of a Cloudflare presence.

Data and platform features on the edge

Full-stack applications typically need persistence, and Cloudflare offers three options:

  • KV, a globally replicated key-value store designed for high performance.
  • Durable Objects, a strongly consistent coordination primitive that can be jurisdiction-limited.
  • R2, upcoming object storage.
Supporting Remix with full stack Cloudflare Pages

Remix already has built-in integration with KV for session storage; Durable Objects support is in progress. Applications can also use Cloudflare’s other Workers runtime features, including geolocation on incoming requests, HTMLRewriter, and the Cache API.

Deploying a Remix app to Pages

Pages grew out of a static asset service, and the addition of serverless functions makes it a full application hosting platform. To start a new Remix project targeting Pages, use the scaffolding CLI and choose “Cloudflare Pages” when prompted for a deployment target:

npx create-remix@latest

After the project is created, push it to a GitHub or GitLab repository. In the Cloudflare Pages dashboard, connect that repository and pick “Remix” from the framework preset dropdown. The app is then served on a pages.dev subdomain, or you can attach a custom domain.

Scaffolded projects include a functions/[[path]].ts file. That’s the functions integration responsible for routing every path on the site to the Remix application. Application logic itself lives in the app folder. Pages’ built-in rollbacks and preview deployments make it easy to test changes; for local development, the project uses the wrangler 2.0 beta, launched via npm run dev.

Roadmap for frameworks on Pages

Remix’s integration is a starting point rather than a finish line. Cloudflare says it is working on improving Pages build times and general developer experience, plus additional platform features. For developers exploring the edge, the Cloudflare Developers Discord server is the place to share what you’re building on Remix, SvelteKit, or any other Pages project.