-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.cmd
More file actions
42 lines (37 loc) · 796 Bytes
/
run.cmd
File metadata and controls
42 lines (37 loc) · 796 Bytes
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
@echo off
rem Build backend
echo Building backend...
go get
if %ERRORLEVEL% NEQ 0 (
echo Command "go get" exited with %ERRORLEVEL%
exit 1
)
go build
if %ERRORLEVEL% NEQ 0 (
echo Command "go build" exited with %ERRORLEVEL%
exit 1
)
rem Build frontend
echo Building frontend...
cd ui
call npm install
if %ERRORLEVEL% NEQ 0 (
echo Command "npm install" exited with %ERRORLEVEL%
exit 1
)
call npm run build:prod
if %ERRORLEVEL% NEQ 0 (
echo Command "npm run build:prod" exited with %ERRORLEVEL%
exit 1
)
cd ..
if not exist ./www mkdir ./www
copy /Y ui\dist\* www
if %ERRORLEVEL% NEQ 0 (
echo Command "copy /Y ui\dist\* www" exited with %ERRORLEVEL%
exit 1
)
rem Run application
echo Starting dashboard
set DASH_CONFIG=./config/dashboard.json
dashboard.exe