-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
107 lines (96 loc) · 2.68 KB
/
start.bat
File metadata and controls
107 lines (96 loc) · 2.68 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
104
105
106
107
@echo off
chcp 65001 >nul
title Mobile Car Wash Manager
color 0A
echo.
echo ========================================
echo Mobile Car Wash Manager - Quick Start
echo ========================================
echo.
REM Check if node is installed
echo [1/4] Checking Node.js installation...
where node >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo.
echo ========================================
echo ERROR: Node.js is not installed!
echo ========================================
echo.
echo To fix this:
echo 1. Open INSTALL_NODEJS.txt in this folder
echo 2. Follow the simple step-by-step guide
echo 3. Restart your computer after installing
echo 4. Run this script again
echo.
echo Or go directly to: https://nodejs.org/
echo (Download the LTS version)
echo.
echo Press any key to exit...
pause >nul
exit /b 1
)
REM Verify node works
node --version >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ERROR: Node.js found but not working properly
echo Please restart your computer after installing Node.js
echo.
pause
exit /b 1
)
for /f "tokens=*" %%i in ('node --version') do set NODE_VERSION=%%i
echo ✓ Node.js found: %NODE_VERSION%
REM Check if npm is available
echo [2/4] Checking npm...
where npm >nul 2>nul
if %ERRORLEVEL% NEQ 0 (
echo ERROR: npm is not found
echo Node.js may not be installed correctly
echo Please reinstall Node.js from nodejs.org
echo.
pause
exit /b 1
)
echo ✓ npm found
REM Check and install dependencies
echo [3/4] Checking dependencies...
if not exist "node_modules" (
echo Installing dependencies (this may take 1-2 minutes)...
echo Please wait...
call npm install
if %ERRORLEVEL% NEQ 0 (
echo.
echo ========================================
echo ERROR: Failed to install dependencies
echo ========================================
echo.
echo Try running manually: npm install
echo.
pause
exit /b 1
)
echo ✓ Dependencies installed
) else (
echo ✓ Dependencies already installed
)
REM Start the app
echo [4/4] Starting app...
echo.
echo ========================================
echo App is starting...
echo ========================================
echo.
echo The app will open in your browser automatically.
echo.
echo To stop the server: Press Ctrl+C
echo.
echo ========================================
echo.
REM Change to script directory
cd /d "%~dp0"
REM Start the dev server
call npm run dev
REM If we get here, the server stopped
echo.
echo Server stopped.
pause