...
This commit is contained in:
39
serve.sh
Executable file
39
serve.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Display welcome message
|
||||
echo "==================================================="
|
||||
echo "Mycelium Society Website - Serve Production Build"
|
||||
echo "==================================================="
|
||||
echo "This script will serve the production build of the Mycelium Society website."
|
||||
echo ""
|
||||
|
||||
# Check if dist directory exists
|
||||
# if [ ! -d "dist" ]; then
|
||||
# echo "Production build not found. Running build script..."
|
||||
# ./build.sh
|
||||
# if [ $? -ne 0 ]; then
|
||||
# echo "Build failed. Please check the error messages above."
|
||||
# exit 1
|
||||
# fi
|
||||
# fi
|
||||
|
||||
./build.sh
|
||||
|
||||
# Check if pnpm is installed
|
||||
if ! command -v pnpm &> /dev/null; then
|
||||
echo "pnpm is not installed. Please run ./install.sh first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Serve the production build
|
||||
echo "Serving the production build..."
|
||||
echo "The website will be available at http://localhost:4173"
|
||||
echo ""
|
||||
echo "Press Ctrl+C to stop the server."
|
||||
echo "==================================================="
|
||||
|
||||
pnpm run preview -- --host
|
||||
|
||||
# This script will not reach here unless the server is stopped
|
||||
echo ""
|
||||
echo "Server stopped."
|
Reference in New Issue
Block a user