Skip to content

Commit d47764f

Browse files
committed
Enhance build process in start-server.sh: add cleanup for previous builds, check for build success, and provide user feedback during server startup.
1 parent b64a04c commit d47764f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

start-server.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,23 @@ echo " Data Source: $DATA_SOURCE_NAME"
3737
echo " Log Level: $LOG_LEVEL"
3838
echo ""
3939

40+
# Clean previous build
41+
if [ -f "excalidraw-server" ]; then
42+
echo "🧹 Cleaning previous build..."
43+
rm excalidraw-server
44+
fi
45+
4046
# Build and run
4147
echo "🔨 Building server..."
4248
go build -o excalidraw-server .
4349

50+
if [ ! -f "excalidraw-server" ]; then
51+
echo "❌ Build failed!"
52+
exit 1
53+
fi
54+
55+
echo "✓ Build successful"
56+
echo ""
4457
echo "▶️ Starting server on :3002..."
4558
echo " Press Ctrl+C to stop"
4659
echo ""

0 commit comments

Comments
 (0)