Build a Full-Stack Expo App with Prisma Accelerate (Deploy Fast with EAS Hosting)
Beto, May 11, 2025 · 7,361 views
Learn how to build a full-stack to-do app using Expo Router and Prisma's ORM with their new fully managed Postgres database and Prisma Accelerate features. You'll learn how to set up the database, schema, and API routes, then deploying the app with EAS Hosting.
If you want to create scalable full-stack Expo apps with a modern database backend and fast global connection pooling, this video is for you. It’s practical and walks through everything from project setup to deployment.
What's inside
- Building full-stack apps with Expo Router and Prisma
- Setting up Prisma’s managed Postgres database with Accelerate
- Creating the Prisma schema and running migrations
- Using Prisma Client with Accelerate in Expo Router API routes
- Handling environment variables and Cloudflare worker caveats
- Implementing API routes for CRUD operations
- Configuring Expo app.json for server output
- Deploying the app with EAS Hosting
Building full-stack apps with Expo Router and Prisma
Expo Router now supports full-stack applications by combining frontend navigation with backend API routes. I demonstrate how to leverage Expo Router’s API routes alongside Prisma ORM to build a to-do app.
Prisma’s ORM simplifies database interactions, and with Expo Router, you can keep frontend and backend code in the same project. This approach streamlines development and deployment for Expo apps.
Setting up Prisma’s managed Postgres database with Accelerate
Prisma offers a fully managed Postgres database with a generous free tier, eliminating the need to find and configure your own database provider. I show creating a new Prisma project, selecting a region, and enabling Prisma Accelerate.
Prisma Accelerate adds a global connection pool and caching layer, making your app faster and more scalable out of the box. This managed setup reduces infrastructure overhead and improves performance.
Creating the Prisma schema and running migrations
Inside the Expo project, a Prisma folder is created with a schema file defining the database source and models. The example defines a simple to-do model with fields like id, title, completed, createdAt, and updatedAt.
After defining the schema, I run to apply migrations and sync the database. This step generates the Prisma client code inside the project for type-safe database access.
Using Prisma Client with Accelerate in Expo Router API routes
I install the Prisma Accelerate extension and generates a Prisma client configured for Accelerate. It imports this client in API route handlers to interact with the database.
API routes are created under a folder in the Expo Router project. The example shows a POST handler that creates a new to-do item by reading the title from the request body and saving it with Prisma.
Handling environment variables and Cloudflare worker caveats
Expo Router API routes run on Cloudflare workers, which have limitations like no file system access. This means Prisma cannot read files directly in the worker environment.
To work around this, environment variables must be accessed via and the file renamed or duplicated as . The Prisma client is instantiated inside the API handler after confirming the environment variable is available.
Implementing API routes for CRUD operations
I demonstrate creating API routes with Expo Router’s convention. It exports async functions like to handle HTTP methods.
The to-do POST API validates the request body, creates a new record with Prisma, and returns a JSON response with status 201. This pattern can be extended for other CRUD operations.
Configuring Expo app.json for server output
To enable API routes, the file is modified to set the web output to instead of . This is necessary because API routes require server-side execution.
This small configuration change allows Expo Router to handle backend logic alongside the frontend in the same project.
Deploying the app with EAS Hosting
At the end, I show how to deploy the full-stack Expo app using EAS Hosting. This service supports server-side API routes and Prisma’s managed database, enabling fast and scalable deployment.
Deploying with EAS Hosting completes the workflow from local development to production-ready full-stack Expo apps.
Resources

CourseReact Native course
Fundamentals through shipping: the concepts behind the prompts, with lifetime access.

Premium resourcePro membership
Access all courses, premium resources, and private GitHub repos with lifetime access.
Like this article? Get the rest of the library plus weekly React Native tips. Free.