Lesson 3 of 3•Building Web Apps with AI Assistance0 of 3 complete (0%)
Deploying to Production
11 min
What you will learn
- Deploy a full-stack Next.js application to Vercel with a database
- Set up a production database with Neon, PlanetScale, or Supabase
- Configure environment variables, domains, and monitoring
- Use AI to diagnose and fix production issues
# Deploying to Production
Your app works locally. Now let's make it work for the world. Modern deployment is dramatically simpler than it was five years ago, especially for Next.js applications.
The Production Stack
For a Next.js full-stack app, the standard modern stack is:
- Hosting: Vercel (free tier is generous)
- Database: Neon (serverless PostgreSQL, free tier), Supabase, or PlanetScale
- Authentication: NextAuth.js (runs on Vercel)
- File storage: Vercel Blob, Cloudflare R2, or AWS S3
- Domain: Any registrar (Namecheap, Google Domains, Cloudflare)
Step 1: Set Up the Production Database
Using Neon (serverless PostgreSQL):
- 1.Create an account at neon.tech
- 2.Create a new project
- 3.Copy the connection string
> Set up this project for a production Neon database:
- Update prisma/schema.prisma for PostgreSQL if it isn't already
- Create a migration script
- Show me the environment variables I need to set
- Add a seed script for initial dataUnlock this lesson
Upgrade to Pro to access the full content
What you'll learn:
- Deploy a full-stack Next.js application to Vercel with a database
- Set up a production database with Neon, PlanetScale, or Supabase
- Configure environment variables, domains, and monitoring