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
π§βπ» 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
π 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
π 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)