Skip to content

Latest commit

 

History

History
87 lines (70 loc) · 3.01 KB

File metadata and controls

87 lines (70 loc) · 3.01 KB

Deployment Checklist for Render

Before deploying to Render, ensure you have completed these steps:

✅ Pre-Deployment Checklist

1. Repository Setup

  • Code is committed to Git
  • Repository is pushed to GitHub/GitLab
  • .env file is NOT in the repository (check .gitignore)
  • .env.example is up to date with all required variables

2. MongoDB Setup

  • MongoDB Atlas database is created
  • Database user is created with read/write permissions
  • Network access allows connections from anywhere (0.0.0.0/0)
  • Connection string is ready

3. Google OAuth Setup (if using)

  • Google Cloud project is created
  • OAuth 2.0 Client ID is created
  • Authorized redirect URIs include production URL
  • Client ID and Client Secret are ready

4. Environment Variables Ready

Have these values prepared:

  • MONGO_URL - MongoDB connection string
  • SESSION_KEY - Random secret (32+ characters)
  • JWT_SECRET - Random secret (32+ characters)
  • GOOGLE_CLIENT_ID - From Google Cloud Console
  • GOOGLE_CLIENT_SECRET - From Google Cloud Console
  • BACKEND_URL - Will be https://your-app-name.onrender.com
  • FRONTEND_URL - Your frontend URL
  • APP_REDIRECT_URL - Mobile app deep link
  • MCP_SERVER_URL - MCP server URL (if applicable)
  • SENDGRID_API_KEY - SendGrid key (if using email)
  • SENDGRID_FROM_EMAIL - Email sender address (if using email)

5. Code Review

  • All router files are properly imported in app.js
  • Error handling middleware is in place
  • Health check endpoint (/) is working
  • CORS is properly configured
  • Port is read from process.env.PORT

🚀 Quick Deploy Steps

  1. Go to Render: https://dashboard.render.com
  2. New Web Service: Click "New +" → "Web Service"
  3. Connect Repository: Link your GitHub/GitLab account
  4. Configure Service:
    • Name: nirveonx-app-backend
    • Runtime: Node
    • Build: npm install
    • Start: npm start
  5. Add Environment Variables: Copy from your .env file
  6. Deploy: Click "Create Web Service"

⚙️ Post-Deployment

After successful deployment:

  • Visit your app URL to verify it's running
  • Check logs for any errors
  • Test health check endpoint
  • Update Google OAuth redirect URIs with production URL
  • Test authentication flow
  • Test API endpoints
  • Update mobile app with production backend URL

🔧 Common Issues

Build fails: Check Node.js version in logs App won't start: Verify all environment variables are set Database errors: Check MongoDB connection string and network access OAuth errors: Verify redirect URIs in Google Cloud Console

📝 Notes

  • Free tier spins down after 15 minutes of inactivity
  • First request after spin-down takes 30-60 seconds
  • Consider upgrading to Starter plan ($7/month) for production

📚 Resources