-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-dev-environment.bat
More file actions
107 lines (96 loc) · 2.67 KB
/
Copy pathsetup-dev-environment.bat
File metadata and controls
107 lines (96 loc) · 2.67 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
setlocal enabledelayedexpansion
echo ======================================
echo Dev Environment Setup
echo ======================================
echo.
echo Step 1: Checking prerequisites...
REM Check Node.js
where node >nul 2>&1
if %errorlevel% neq 0 (
echo [X] Node.js not found
echo -^> Please install Node.js 18.x from https://nodejs.org/
exit /b 1
) else (
for /f "tokens=*" %%i in ('node --version') do set NODE_VERSION=%%i
echo [OK] Node.js !NODE_VERSION!
)
REM Check npm
where npm >nul 2>&1
if %errorlevel% neq 0 (
echo [X] npm not found
exit /b 1
) else (
for /f "tokens=*" %%i in ('npm --version') do set NPM_VERSION=%%i
echo [OK] npm !NPM_VERSION!
)
REM Check Docker (optional)
where docker >nul 2>&1
if %errorlevel% neq 0 (
echo [!] Docker not found (optional - needed for full stack)
set HAS_DOCKER=false
) else (
for /f "tokens=*" %%i in ('docker --version') do set DOCKER_VERSION=%%i
echo [OK] Docker !DOCKER_VERSION!
set HAS_DOCKER=true
)
echo.
echo Step 2: Installing central-control dependencies...
cd central-control
call npm install
if %errorlevel% neq 0 (
echo [X] Failed to install central-control dependencies
cd ..
exit /b 1
)
cd ..
echo [OK] Central control dependencies installed
echo.
echo Step 3: Installing frontend dependencies...
cd frontend
call npm install
if %errorlevel% neq 0 (
echo [X] Failed to install frontend dependencies
cd ..
exit /b 1
)
cd ..
echo [OK] Frontend dependencies installed
echo.
echo ======================================
echo [OK] Dev Environment Setup Complete!
echo ======================================
echo.
echo Available commands:
echo.
echo Backend (Central Control):
echo cd central-control
echo npm start # Start with hot reload
echo npm run start:debug # Start with debugger
echo npm test # Run tests
echo npm run build # Build for production
echo.
echo Frontend:
echo cd frontend
echo npm start # Start dev server (http://localhost:4200)
echo npm test # Run tests
echo npm run build # Build for production
echo.
if "!HAS_DOCKER!"=="true" (
echo Docker Development:
echo npm run setup # Setup development environment
echo npm start # Start all containers
echo npm stop # Stop all containers
echo npm run docker:build # Build production images
echo.
)
echo Quick start (no Docker):
echo # Terminal 1:
echo cd central-control ^&^& npm start
echo.
echo # Terminal 2:
echo cd frontend ^&^& npm start
echo.
echo Then open http://localhost:4200 in your browser
echo.
pause