Skip to content

Latest commit

 

History

History
52 lines (37 loc) · 1.41 KB

File metadata and controls

52 lines (37 loc) · 1.41 KB

📋 Simple .env Setup Instructions

Option 1: Copy the Ready-Made File

  1. Open the file: READY_TO_PASTE.env
  2. Copy all content (Ctrl+A, Ctrl+C)
  3. Create new file: lastmile-nextjs/.env.local
  4. Paste the content (Ctrl+V)
  5. Replace: your-project-name with your actual Vercel project name
  6. Save the file

Option 2: Use Existing File

Your lastmile-nextjs/.env.local file is already updated with production values!

Just change:

  • https://your-project-name.vercel.app → Your actual Vercel URL

⚠️ Important: Update Your Project URL

In both files, replace your-project-name with your actual Vercel project name:

Example:

  • If your Vercel URL is https://lastmile-delivery-abc123.vercel.app
  • Replace all instances of your-project-name with lastmile-delivery-abc123

🚀 After Setting Up .env

  1. Test locally:

    cd lastmile-nextjs
    npm run dev
  2. Deploy to Vercel:

    npm run deploy:vercel
  3. Test deployed app:

    • Visit: https://your-project-name.vercel.app/api/health
    • Should return: {"status": "healthy"}

✅ Environment Variables Included

  • ✅ MONGODB_URI (your existing database)
  • ✅ JWT_SECRET (secure generated key)
  • ✅ NEXTAUTH_SECRET (secure generated key)
  • ✅ NEXTAUTH_URL (your Vercel URL)
  • ✅ All required Next.js variables

That's it! Your environment is ready for deployment.