27 lines
1.0 KiB
Bash
Executable File
27 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
DOCKER=${DOCKER:-docker}
|
|
|
|
# Advanced concurrent development server runner using concurrently (if available)
|
|
# Falls back to basic parallel execution if concurrently is not installed
|
|
|
|
# Check if concurrently is installed
|
|
if command -v npx &> /dev/null && npx concurrently --version &> /dev/null 2>&1; then
|
|
echo "Using concurrently for better process management..."
|
|
|
|
npx concurrently --kill-others \
|
|
--names "Redis,Backend,Meilisearch,Frontend,OpenGraph" \
|
|
--prefix "[{name}]" \
|
|
--prefix-colors "red,green,yellow,blue,magenta" \
|
|
"$DOCKER compose -f deployments/docker-compose.dev.yml up redis" \
|
|
"sleep 2 && cd hiling_go && air" \
|
|
"cd hiling_go && ./dev-meilisearch.sh" \
|
|
"cd hilingriviw && pnpm dev" \
|
|
"cd hiling-opengraph && deno task dev"
|
|
else
|
|
echo "concurrently not found. Install it for better process management:"
|
|
echo " npm install -g concurrently"
|
|
echo ""
|
|
echo "Falling back to run-dev.sh..."
|
|
exec ./run-dev.sh
|
|
fi |