File size: 1,380 Bytes
5a81b95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@echo off
setlocal enabledelayedexpansion
title WidgeTDC Startup

echo.
echo ================================================
echo   WidgeTDC - Development Environment
echo ================================================
echo.

:: Check if Docker is running
docker info >nul 2>&1
if %errorlevel% neq 0 (
    echo [WARNING] Docker is not running!
    echo           Starting without infrastructure containers...
    echo.
    goto :start_app
)

:: Start infrastructure if not running
echo [1/3] Checking infrastructure...
docker ps --filter "name=widgetdc-postgres" --format "{{.Names}}" | findstr "widgetdc-postgres" >nul
if %errorlevel% neq 0 (
    echo       Starting PostgreSQL, Redis, Neo4j...
    docker-compose -f docker-compose.infra.yml up -d
    echo       Waiting for services to start...
    timeout /t 10 /nobreak >nul
) else (
    echo       Infrastructure already running
)

:start_app
echo.
echo [2/3] Building shared packages...
call npm run build:shared >nul 2>&1
echo       Done

echo.
echo [3/3] Starting applications...
echo.
echo ================================================
echo   Backend:   http://localhost:3001
echo   Frontend:  http://localhost:5173
echo   Neo4j:     http://localhost:7474
echo   Health:    http://localhost:3001/health
echo ================================================
echo.
echo   Press Ctrl+C to stop
echo.

call npm run dev