DEV Community

Cover image for πŸš€ Deploying Your App to Vercel: A Step-by-Step Guide
Manu Kumar Pal
Manu Kumar Pal

Posted on

πŸš€ Deploying Your App to Vercel: A Step-by-Step Guide

Hey devs! πŸ‘‹ Need to get your frontend app live fast? Vercel is one of the easiest ways to deploy React, Next.js, or Vite projects β€” straight from your Git repo.

πŸ“¦ Step 1: Prepare Your Project

Make sure your project is production-ready:

βœ… Runs without errors
βœ… Uses environment variables (if needed)
βœ… Has a package.json with build and start scripts

# Example: React project with Create React App
npm run build
Enter fullscreen mode Exit fullscreen mode

πŸ§‘β€πŸ’» Step 2: Push to GitHub

Vercel deploys directly from Git.
Make sure your code is in a GitHub repo:

git init
git add .
git commit -m "initial commit"
git remote add origin https://github.com/your-username/your-repo.git
git push -u origin main
Enter fullscreen mode Exit fullscreen mode

🌐 Step 3: Connect to Vercel

Go to vercel.com -> https://vercel.com/
Click "Add New Project"
Authorize GitHub and select your repo

βš™οΈ Step 4: Configure Project Settings

Vercel automatically detects the framework (e.g., React, Next.js).

πŸ“ Root Directory: usually / unless you’re in a monorepo
πŸ§ͺ Environment Variables: add any API_KEY, etc.
βš™οΈ Build Command: npm run build
🌍 Output Directory: build (for CRA), .next (for Next.js)

☁️ Step 5: Deploy!

Click Deploy and wait... ⏳ Once done, you’ll see:


βœ… Deployment Complete
πŸ”— https://your-project.vercel.app
Enter fullscreen mode Exit fullscreen mode

πŸ›  Bonus: Set Up Custom Domain (Optional)

Go to Settings > Domains
Add your custom domain (e.g., myapp.dev)
Update DNS settings in your registrar

🧩 Troubleshooting Tips

❌ Build fails? Check logs for missing packages or wrong paths.
πŸ”„ Stuck on "Initializing"? Make sure your repo is public or correctly linked.
πŸ—‚οΈ Wrong output directory? Adjust in Project Settings > Build & Output Settings

βœ… You're Live!
πŸŽ‰ Your app is now live on the internet, served by a global CDN.

🧠 Why Vercel?

Vercel makes it incredibly easy to deploy modern web apps with:

🌍 Global CDN out of the box
πŸ” Automatic deployments from GitHub
πŸ” Built-in environment variable management
πŸ“ˆ Performance monitoring & analytics

Thanks for reading! πŸš€ Got questions or feedback? Drop a comment. Happy deploying! πŸ™Œ

Top comments (0)