21 lines
466 B
Bash
21 lines
466 B
Bash
#!/bin/bash
|
|
|
|
# Exit immediately if a command exits with a non-zero status
|
|
set -e
|
|
|
|
# Navigate to the app directory
|
|
cd /app
|
|
|
|
# Install dependencies if node_modules doesn't exist
|
|
if [ ! -d "node_modules" ]; then
|
|
echo "Installing dependencies..."
|
|
npm install
|
|
fi
|
|
|
|
# Get the app name from environment variable or use default
|
|
APP_NAME=${APP_NAME:-hcportal}
|
|
|
|
# Serve the application
|
|
echo "Starting ${APP_NAME}..."
|
|
npx nx serve ${APP_NAME} --host 0.0.0.0 --port 4200
|