-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
74 lines (66 loc) · 2.03 KB
/
setup.bat
File metadata and controls
74 lines (66 loc) · 2.03 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
@echo off
echo Setting up Botho Innovation Hub Project...
REM Check for Administrator privileges
net session >nul 2>nul
if errorlevel 1 (
echo ERROR: This script requires Administrator privileges.
echo Please run Command Prompt as Administrator and try again.
pause
exit /b 1
)
REM Clone repository
echo Step 1: Cloning repository...
set REPO_URL=https://github.com/BU-Innovation-Hub/stackfoundry.git
git clone %REPO_URL%
if errorlevel 1 (
echo ERROR: Failed to clone repository from %REPO_URL%
echo Please check your internet connection and repository URL.
pause
exit /b 1
)
REM Navigate to project directory
pushd stackfoundry
if errorlevel 1 (
echo ERROR: Failed to navigate to stackfoundry directory.
echo The clone may have failed or the directory was not created.
pause
exit /b 1
)
REM Install dependencies
echo Step 2: Installing dependencies...
call npm run install:all
REM Setup environment
echo Step 3: Setting up environment...
copy backend\.env.example backend\.env
echo Please update backend/.env with your configuration
REM Install MongoDB (if not installed)
echo Step 4: Checking MongoDB...
where mongod >nul 2>nul
if errorlevel 1 (
echo MongoDB not found. Please install MongoDB Community Edition
echo Download from: https://www.mongodb.com/try/download/community
pause
exit /b 1
)
REM Start services
echo Step 5: Starting services...
echo Starting MongoDB...
net start MongoDB
if errorlevel 1 (
echo ERROR: Failed to start MongoDB service.
echo Possible causes:
echo - MongoDB service may not be registered with Windows
echo - MongoDB service may already be running
echo - MongoDB installation may be incomplete
echo.
echo To diagnose:
echo - Run: sc query MongoDB
echo - Check Service details in Task Manager ^(Services tab^)
echo - Review MongoDB logs in Program Files/MongoDB/Server/logs/
pause
exit /b 1
)
echo SUCCESS: MongoDB service started.
echo Setup complete!
echo Run 'npm run dev' to start development servers
pause