Introducing EAS Hosting: Simplified deployment for modern React apps

From weather apps, and commerce websites, to AI-powered chat apps, most modern applications today need reliable servers. That's why today we're introducing EAS Hosting for instantly deploying and scaling universal API routes, React websites, and more! The Challenge of Universal App Deployment Many massive companies such as Netflix, Meta, and Apple use server-driven UI in their native apps. But building a server-driven application is extremely challenging and simply out of reach for most developers. Our goal with Expo Router has been to solve this problem and enable anyone to build and scale world-class server-driven apps for Android, iOS, and web using the same codebase. To this end, we've introduced API Routes that can be used to create server endpoints for your app, secure environment variables, and static generation for web pages, all building toward universal React Server Components. While all these features work great on a local dev server, deployment has become more challenging. There are many full-stack problems to consider when building a modern application. We've historically recommended deploying Expo websites and universal API routes to traditional hosting services that are focused only on websites. But hosting services for websites traditionally don’t integrate with the problems native apps face. New versions of your servers may need to be deployed while new versions of your native app are being published to app stores. Different versions of your native app may need to have their requests routed to different versions of your server. Observability of servers for critical metrics, such as feature adoption by platform, becomes more important for Expo native apps. With EAS Hosting, in conjunction with EAS Workflows, we’re providing an end-to-end deployment solution that just works across all platforms, and stays working as you scale. How to Get Started with EAS Hosting First, ensure you’re using the latest version of EAS CLI: npm i -g eas-cli Then simply bundle your app with Expo CLI, deploy your website and server code worldwide with a single EAS command, and get a preview URL immediately: npx expo export -p web eas deploy That's it! Your website and API routes are now live with a beautiful .expo.app URL that you can share with anyone. (For an example Expo web deployment, visit: https://bacon.expo.app) Add environment variables to your .env file, and these will securely reside on the server-side for use in API routes and React Server Functions, keeping them out of your client code. By visiting the EAS dashboard, you can monitor your deployments and see helpful telemetry. Server errors are automatically aggregated and can be linked to for triaging! Here's a comprehensive video demonstration of EAS Hosting that covers deployment, assigning aliases, using API routes, looking up request logs, managing environment variables, and automating deployments with Workflows:

Jan 14, 2025 - 17:04
Introducing EAS Hosting: Simplified deployment for modern React apps

From weather apps, and commerce websites, to AI-powered chat apps, most modern applications today need reliable servers. That's why today we're introducing EAS Hosting for instantly deploying and scaling universal API routes, React websites, and more!

The Challenge of Universal App Deployment

Many massive companies such as Netflix, Meta, and Apple use server-driven UI in their native apps. But building a server-driven application is extremely challenging and simply out of reach for most developers. Our goal with Expo Router has been to solve this problem and enable anyone to build and scale world-class server-driven apps for Android, iOS, and web using the same codebase.

To this end, we've introduced API Routes that can be used to create server endpoints for your app, secure environment variables, and static generation for web pages, all building toward universal React Server Components. While all these features work great on a local dev server, deployment has become more challenging.

There are many full-stack problems to consider when building a modern application. We've historically recommended deploying Expo websites and universal API routes to traditional hosting services that are focused only on websites. But hosting services for websites traditionally don’t integrate with the problems native apps face.

  • New versions of your servers may need to be deployed while new versions of your native app are being published to app stores.
  • Different versions of your native app may need to have their requests routed to different versions of your server.
  • Observability of servers for critical metrics, such as feature adoption by platform, becomes more important for Expo native apps.

With EAS Hosting, in conjunction with EAS Workflows, we’re providing an end-to-end deployment solution that just works across all platforms, and stays working as you scale.

How to Get Started with EAS Hosting

First, ensure you’re using the latest version of EAS CLI:

npm i -g eas-cli

Then simply bundle your app with Expo CLI, deploy your website and server code worldwide with a single EAS command, and get a preview URL immediately:

npx expo export -p web
eas deploy

That's it! Your website and API routes are now live with a beautiful .expo.app URL that you can share with anyone. (For an example Expo web deployment, visit: https://bacon.expo.app)

Add environment variables to your .env file, and these will securely reside on the server-side for use in API routes and React Server Functions, keeping them out of your client code.

By visiting the EAS dashboard, you can monitor your deployments and see helpful telemetry. Server errors are automatically aggregated and can be linked to for triaging!

Image description

Here's a comprehensive video demonstration of EAS Hosting that covers deployment, assigning aliases, using API routes, looking up request logs, managing environment variables, and automating deployments with Workflows: