initial
This commit is contained in:
20
main.py
Normal file
20
main.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
from backend.app import create_app, socketio
|
||||
|
||||
|
||||
def main():
|
||||
"""Run the Flask application with SocketIO"""
|
||||
app = create_app()
|
||||
|
||||
# Get port from environment or default to 5000
|
||||
port = int(os.environ.get('PORT', 5000))
|
||||
|
||||
print(f"Starting Trivia Game server on http://localhost:{port}")
|
||||
print(f"Environment: {os.environ.get('FLASK_ENV', 'development')}")
|
||||
|
||||
# Run with socketio instead of app.run() for WebSocket support
|
||||
socketio.run(app, host='0.0.0.0', port=port, debug=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user