-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSTOP_AND_RESTART.bat
More file actions
58 lines (53 loc) · 1.39 KB
/
STOP_AND_RESTART.bat
File metadata and controls
58 lines (53 loc) · 1.39 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
@echo off
echo ========================================
echo L2H Blog Backend - Restart Script
echo ========================================
echo.
echo This script will help you restart your server properly.
echo.
echo Step 1: Stopping any running Node processes...
echo.
taskkill /F /IM node.exe 2>nul
timeout /t 2 /nobreak >nul
echo.
echo Step 2: Navigating to backend directory...
cd /d "%~dp0"
echo Current directory: %CD%
echo.
echo Step 3: Checking .env file...
if not exist ".env" (
echo ERROR: .env file not found!
echo Please create .env file with BLOB_READ_WRITE_TOKEN
pause
exit /b 1
)
echo .env file found: YES
echo.
echo Step 4: Testing Vercel Blob connection...
node test-blob-upload.js
if errorlevel 1 (
echo.
echo ========================================
echo ERROR: Vercel Blob test failed!
echo ========================================
echo.
echo Please check:
echo 1. BLOB_READ_WRITE_TOKEN in .env file
echo 2. Token should NOT have quotes
echo 3. Get token from: https://vercel.com/dashboard/stores
echo.
pause
exit /b 1
)
echo.
echo ========================================
echo Test passed! Starting server...
echo ========================================
echo.
echo Watch for this line:
echo BLOB_READ_WRITE_TOKEN: [checkmark] Set
echo.
echo If you see [X] Not Set, press Ctrl+C and run this script again.
echo.
pause
npm run dev