forked from PHCoder05/new-raso
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrestart-app.bat
More file actions
56 lines (49 loc) · 1.18 KB
/
Copy pathrestart-app.bat
File metadata and controls
56 lines (49 loc) · 1.18 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
@echo off
echo ======================================
echo GST Invoice System - Application Restart
echo ======================================
echo.
REM Kill any running Next.js processes
echo Stopping any running Next.js processes...
taskkill /f /im node.exe 2>nul
if %ERRORLEVEL% EQU 0 (
echo Successfully stopped existing processes.
) else (
echo No running Next.js processes found.
)
echo.
REM Clear Next.js cache
echo Clearing Next.js cache...
if exist .next (
rmdir /s /q .next
echo Cache cleared successfully.
) else (
echo No cache folder found.
)
echo.
REM Install dependencies
echo Installing dependencies...
call yarn install
if %ERRORLEVEL% NEQ 0 (
echo Error installing dependencies. Please check your network connection.
goto :error
)
echo Dependencies installed successfully.
echo.
REM Run the database test script
echo Testing database connection...
call node test-transaction.js
echo.
echo ======================================
echo Application restart complete!
echo.
echo To start the application, run:
echo yarn dev
echo ======================================
pause
exit /b 0
:error
echo.
echo Error occurred during restart. Please check the logs above.
pause
exit /b 1