feat: migrar backend unificado a Go 1.27 + SPA Vite embebido
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@echo off
|
||||
title Cotizador - Uriel Jareth Consulting - Iniciando...
|
||||
title Cotizador - Uriel Jareth Consulting (Go) - Iniciando...
|
||||
echo ============================================
|
||||
echo Cotizador - Uriel Jareth Consulting - Iniciando Servidor
|
||||
echo Cotizador - Uriel Jareth Consulting (Go)
|
||||
echo ============================================
|
||||
echo.
|
||||
|
||||
@@ -19,19 +19,26 @@ if %errorlevel% neq 0 (
|
||||
)
|
||||
|
||||
echo.
|
||||
echo [2/3] Verificando base de datos...
|
||||
call npx prisma migrate deploy 2>nul
|
||||
if %errorlevel% neq 0 (
|
||||
echo Aplicando migracion...
|
||||
call npx prisma migrate dev --name init
|
||||
echo [2/3] Compilando SPA Vite + embebiendo assets...
|
||||
if not exist "web\node_modules" (
|
||||
pushd web
|
||||
call npm install
|
||||
popd
|
||||
)
|
||||
pushd web
|
||||
call npm run build
|
||||
popd
|
||||
if exist "internal\spa\dist" (
|
||||
rmdir /s /q "internal\spa\dist"
|
||||
)
|
||||
xcopy /e /i /y "web\dist" "internal\spa\dist" >nul
|
||||
|
||||
echo.
|
||||
echo [3/3] Iniciando servidor Next.js...
|
||||
echo [3/3] Iniciando servidor Go (migraciones automaticas al arrancar)...
|
||||
echo.
|
||||
echo ============================================
|
||||
echo Servidor listo en http://localhost:3000
|
||||
echo Presiona Ctrl+C para detener
|
||||
echo ============================================
|
||||
echo.
|
||||
call npm run dev
|
||||
go run ./cmd/cotizador serve
|
||||
|
||||
Reference in New Issue
Block a user