ArtifaXChatBot / start_server.py
dharu007's picture
Upload 19 files
f87257e verified
Raw History Blame Contribute Delete
1.11 kB
#!/usr/bin/env python3
"""
ArtifaX Production Server - Simple Startup
Run this to start the Flask app on port 8080
"""
import os
import sys
# Change to app directory
app_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(app_dir)
print("\n" + "="*70)
print("🚀 ArtifaX Production Server")
print("="*70)
from web_server import app, socketio
port = 8080
host = '0.0.0.0'
print(f"\n✅ Server Configuration:")
print(f" Port: {port}")
print(f" Host: {host}")
print(f"\n📍 Access URLs:")
print(f" Local: http://localhost:{port}")
print(f" Network: http://192.168.1.17:{port}")
print(f"\n🌐 For external access (remote colleagues):")
print(f" Start ngrok manually: ngrok http 8080")
print(f"\n🎯 Starting server...\n")
try:
socketio.run(
app,
host=host,
port=port,
debug=False,
use_reloader=False,
allow_unsafe_werkzeug=True
)
except KeyboardInterrupt:
print("\n\n✅ Server stopped")
sys.exit(0)
except Exception as e:
print(f"\n❌ Error: {e}")
sys.exit(1)