add file browser component and widget
This commit is contained in:
31
examples/file_browser_demo/serve.sh
Executable file
31
examples/file_browser_demo/serve.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
# serve.sh - Build optimized WASM and serve with Trunk
|
||||
|
||||
set -e
|
||||
|
||||
echo "🔧 Building optimized WASM bundle..."
|
||||
trunk build --release
|
||||
|
||||
echo "📦 Checking bundle sizes..."
|
||||
if [ -d "dist" ]; then
|
||||
echo "Bundle sizes:"
|
||||
find dist -name "*.wasm" -exec ls -lh {} \; | awk '{print " WASM: " $5 " - " $9}'
|
||||
find dist -name "*.js" -exec ls -lh {} \; | awk '{print " JS: " $5 " - " $9}'
|
||||
find dist -name "*.css" -exec ls -lh {} \; | awk '{print " CSS: " $5 " - " $9}'
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "🚀 Starting Trunk development server..."
|
||||
echo "📍 Server will be available at: http://127.0.0.1:8080"
|
||||
echo ""
|
||||
echo "💡 Tips:"
|
||||
echo " - Make sure your Flask backend is running on http://127.0.0.1:5000"
|
||||
echo " - Check CORS configuration in your backend"
|
||||
echo " - Upload files will use TUS protocol for resumable uploads"
|
||||
echo ""
|
||||
echo "⏹️ Press Ctrl+C to stop the server"
|
||||
echo ""
|
||||
|
||||
# Start Trunk serve
|
||||
trunk serve --release
|
Reference in New Issue
Block a user