File size: 975 Bytes
366fe97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash

# Fix start scripts for all templates

templates=(
  "devforge"
  "mobilefirst"
  "saasify"
  "startupkit"
  "analyticsdash"
  "blog"
  "changelog"
  "ai-chat"
  "search"
  "ecommerce"
  "api-docs"
)

for template in "${templates[@]}"; do
  dir="templates-repos/$template"

  if [ -d "$dir" ]; then
    echo "📦 Fixing $template start script..."
    cd "$dir"

    # Update start script in package.json if it exists
    if [ -f package.json ]; then
      # Update start script to bind to all interfaces
      sed -i '' 's/"start": "next start"/"start": "next start -H 0.0.0.0 -p 3000"/' package.json 2>/dev/null || true

      # Commit and push
      git add package.json
      git commit -m "Fix start script to bind to all interfaces" 2>/dev/null || true
      git push hf main --force

      echo "  ✅ Fixed $template"
    else
      echo "  ⚠️  No package.json in $template"
    fi

    cd ../..
  fi
done

echo ""
echo "✅ All start scripts fixed!"