forked from nexhacks-proj/nexhacks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
66 lines (58 loc) · 1.46 KB
/
Copy pathsetup.bat
File metadata and controls
66 lines (58 loc) · 1.46 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
@echo off
echo ============================================
echo SwipeHire Setup Script
echo ============================================
echo.
REM Try common Node.js installation paths
set "NODE_PATHS=C:\Program Files\nodejs;C:\Program Files (x86)\nodejs;%APPDATA%\npm;%LOCALAPPDATA%\Programs\nodejs"
REM Check if npm is available
where npm >nul 2>&1
if %errorlevel% == 0 (
echo [OK] npm found in PATH
goto :install
)
REM Try adding common paths
echo [INFO] npm not in PATH, trying common locations...
for %%P in (%NODE_PATHS%) do (
if exist "%%P\npm.cmd" (
echo [OK] Found npm at: %%P
set "PATH=%PATH%;%%P"
goto :install
)
)
echo.
echo [ERROR] Node.js/npm not found!
echo.
echo Please install Node.js from: https://nodejs.org/
echo.
echo After installing:
echo 1. Restart this window
echo 2. Run: npm install
echo 3. Run: npm run dev
echo.
pause
exit /b 1
:install
echo.
echo [INFO] Installing dependencies...
echo This may take a few minutes...
echo.
call npm install
if %errorlevel% == 0 (
echo.
echo ============================================
echo [SUCCESS] Setup complete!
echo ============================================
echo.
echo Next steps:
echo 1. Make sure .env.local has your API keys
echo 2. Run: npm run dev
echo 3. Open: http://localhost:3000
echo.
) else (
echo.
echo [ERROR] Installation failed!
echo Please check the error messages above.
echo.
)
pause