First commit for bicorder-app
This commit is contained in:
25
bicorder-app/serve-local.sh
Executable file
25
bicorder-app/serve-local.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
# Simple script to serve the built app locally
|
||||
|
||||
if [ ! -d "dist" ]; then
|
||||
echo "Error: dist folder not found. Run 'npm run build' first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Starting local server..."
|
||||
echo "Open your browser to: http://localhost:8000"
|
||||
echo "Press Ctrl+C to stop the server"
|
||||
echo ""
|
||||
|
||||
# Try different server options in order of preference
|
||||
if command -v python3 &> /dev/null; then
|
||||
python3 -m http.server 8000 --directory dist
|
||||
elif command -v python &> /dev/null; then
|
||||
cd dist && python -m SimpleHTTPServer 8000
|
||||
elif command -v php &> /dev/null; then
|
||||
php -S localhost:8000 -t dist
|
||||
else
|
||||
echo "Error: No suitable HTTP server found."
|
||||
echo "Please install Python 3, Python 2, or PHP, or use 'npm run preview'"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user