-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-to-vercel.bat
More file actions
103 lines (86 loc) · 2.13 KB
/
deploy-to-vercel.bat
File metadata and controls
103 lines (86 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
@echo off
echo 🚀 TubeScope Vercel Deployment
echo ==============================
echo.
echo 📋 This script will help you deploy TubeScope to Vercel
echo.
echo 🔧 Prerequisites:
echo - Vercel CLI installed (npm i -g vercel)
echo - YouTube API Key ready
echo - Vercel account logged in
echo.
set /p continue="Ready to deploy? (y/n): "
if /i not "%continue%"=="y" exit /b 1
echo.
echo 🔧 Step 1: Deploy Backend
echo ========================
cd backend
echo Installing backend dependencies...
call npm install
echo.
echo 🚀 Deploying backend to Vercel...
echo When prompted:
echo - Project name: tubescope-backend
echo - Link to existing project: No
echo.
call vercel --prod
if errorlevel 1 (
echo ❌ Backend deployment failed!
pause
exit /b 1
)
echo.
echo ✅ Backend deployed successfully!
echo.
echo 📝 IMPORTANT: Copy the backend URL from above
echo Example: https://tubescope-backend-xyz.vercel.app
echo.
set /p backend_url="Enter your backend URL: "
cd ..
echo.
echo 🎨 Step 2: Deploy Frontend
echo =========================
cd tube-scope
echo Installing frontend dependencies...
call npm install
echo Building frontend...
call npm run build
if errorlevel 1 (
echo ❌ Frontend build failed!
pause
exit /b 1
)
echo.
echo 🚀 Deploying frontend to Vercel...
echo When prompted:
echo - Project name: tubescope-frontend
echo - Link to existing project: No
echo.
call vercel --prod
if errorlevel 1 (
echo ❌ Frontend deployment failed!
pause
exit /b 1
)
cd ..
echo.
echo 🎉 Deployment Complete!
echo ======================
echo.
echo 📋 Next Steps:
echo 1. Go to https://vercel.com/parkashkumarcs
echo 2. Open your backend project (tubescope-backend)
echo 3. Go to Settings → Environment Variables
echo 4. Add: YOUTUBE_API_KEY = your_youtube_api_key
echo.
echo 5. Open your frontend project (tubescope-frontend)
echo 6. Go to Settings → Environment Variables
echo 7. Add: VITE_API_URL = %backend_url%
echo.
echo 🔗 Your live app will be at:
echo https://tubescope-frontend-xyz.vercel.app
echo.
echo 🧪 Test your backend at:
echo %backend_url%/api/channel?id=UC_x5XG1OV2P6uZZ5FSM9Ttw
echo.
pause