-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-codeboard.bat
More file actions
40 lines (32 loc) · 1 KB
/
Copy pathstart-codeboard.bat
File metadata and controls
40 lines (32 loc) · 1 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
@echo off
setlocal EnableExtensions
cd /d "%~dp0"
for /f "tokens=1 delims=." %%a in ('node -v 2^>nul') do set "NODE_MAJOR_RAW=%%a"
if not defined NODE_MAJOR_RAW (
echo [codeboard] Node.js is not installed or not in PATH.
echo [codeboard] Please install Node.js LTS 24+ and re-run this script.
pause
exit /b 1
)
set "NODE_MAJOR=%NODE_MAJOR_RAW:v=%"
if %NODE_MAJOR% LSS 24 (
echo [codeboard] Detected Node.js %NODE_MAJOR_RAW%.
echo [codeboard] Node.js LTS 24+ is required. Please upgrade Node.js and re-run.
pause
exit /b 1
)
echo [codeboard] Ensuring dependencies are synchronized with lockfile...
call npm.cmd ci --no-audit --no-fund
if %ERRORLEVEL% neq 0 (
echo [codeboard] Dependency install failed.
pause
exit /b %ERRORLEVEL%
)
if not exist "prisma\dev.db" (
echo [codeboard] Initializing sqlite database...
call npm.cmd run db:push
)
echo [codeboard] Applying latest schema changes to local database...
call npm.cmd run db:push
echo [codeboard] Starting CodeBoard...
call npm.cmd run dev