Deploying the Backend
The backend service is deployed on Vercel for seamless integration with our frontend application.
Vercel Deployment
Prerequisites
- A Vercel account
- Access to the project repository
- Your environment variables ready
Environment Variables
Make sure to set these in your Vercel project settings:
FRONTEND_URL=your_frontend_url
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_key
NODE_ENV=production
API_URL=you_api_url
Deployment Process
- Connect your GitHub repository to Vercel
- Vercel will automatically detect the Express.js application
- Configure your environment variables in the Vercel dashboard
- Deploy!
Automatic Deployments
- Each push to
maintriggers a production deployment - Pull requests create preview deployments
- Failed builds prevent merging to main
Monitoring
- View deployment logs in the Vercel dashboard
- Monitor API endpoints using Vercel Analytics
- Check deployment status in GitHub checks
Troubleshooting
Common deployment issues:
- Missing environment variables
- Incorrect build settings
- CORS configuration errors
Rolling Back
To roll back to a previous version:
- Visit your project on Vercel
- Go to Deployments
- Select the desired previous deployment
- Click "Promote to Production"