35 lines
991 B
Bash
Executable File
35 lines
991 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Vibing Backend Run Script
|
|
echo "Starting Vibing Backend..."
|
|
|
|
# Check if Java 21 is available
|
|
if ! command -v java &> /dev/null; then
|
|
echo "Error: Java is not installed or not in PATH"
|
|
exit 1
|
|
fi
|
|
|
|
# Check Java version
|
|
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | cut -d'"' -f2 | cut -d'.' -f1)
|
|
if [ "$JAVA_VERSION" != "21" ]; then
|
|
echo "Warning: Java 21 is recommended. Current version: $JAVA_VERSION"
|
|
fi
|
|
|
|
# Check if Maven is available
|
|
if ! command -v mvn &> /dev/null; then
|
|
echo "Error: Maven is not installed or not in PATH"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Building and running the application..."
|
|
echo "The application will be available at:"
|
|
echo " - API Base: http://localhost:8080/api"
|
|
echo " - Health Check: http://localhost:8080/api/health"
|
|
echo " - Swagger UI: http://localhost:8080/swagger-ui.html"
|
|
echo " - H2 Console: http://localhost:8080/h2-console"
|
|
echo ""
|
|
echo "Press Ctrl+C to stop the application"
|
|
echo ""
|
|
|
|
# Run the application
|
|
mvn spring-boot:run |