feat: Add start-dev.bat and improve app.py error reporting
Added Windows-optimized launcher: - start-dev.bat: Simple batch file using npm run dev - Automatically kills processes on ports 3001 and 5173 - Uses concurrently to run both services - Single window, simpler than Python launcher - Recommended for Windows users Improved app.py: - Better error output capture and display - Increased wait time to 3 seconds - Shows last 500 characters of error output Windows users now have 3 options: 1. start-dev.bat (simplest - recommended) 2. python app.py (advanced with port management) 3. npm run dev (manual) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
11
app.py
11
app.py
@@ -179,7 +179,7 @@ class AppLauncher:
|
||||
)
|
||||
|
||||
# Wait a bit and check if process started successfully
|
||||
time.sleep(2)
|
||||
time.sleep(3)
|
||||
|
||||
if self.backend_process.poll() is None:
|
||||
self.print_success("Backend server started successfully")
|
||||
@@ -187,6 +187,15 @@ class AppLauncher:
|
||||
return True
|
||||
else:
|
||||
self.print_error("Backend server failed to start")
|
||||
# Try to read error output
|
||||
if self.backend_process.stdout:
|
||||
try:
|
||||
output = self.backend_process.stdout.read()
|
||||
if output:
|
||||
print(f"\n{Color.FAIL}Error output:{Color.ENDC}")
|
||||
print(output[-500:] if len(output) > 500 else output) # Last 500 chars
|
||||
except:
|
||||
pass
|
||||
return False
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user