YoussefZayed
YoussefZayed
RRailway
Created by YoussefZayed on 12/14/2023 in #✋|help
flask socket Io deploy fails
this is the entire project
9 replies
RRailway
Created by YoussefZayed on 12/14/2023 in #✋|help
flask socket Io deploy fails
@Brody The code is pretty simple its just 1 file with a few socket Io handlers main.py
import random
from flask import Flask, request
from flask_socketio import SocketIO, emit
import datetime
from flask_cors import CORS
import requests

app = Flask(__name__)
socketio = SocketIO(app, cors_allowed_origins='*')

@app.route('/')
def index():
return 'Welcome to your Flask-SocketIO server!'

@socketio.on('connect')
def handle_connect():
// code here

// other handlers

@socketio.on('disconnect')
def handle_disconnect():
// code



if __name__ == '__main__':
socketio.run(app, debug=True, port=os.getenv("PORT", default=5000))
import random
from flask import Flask, request
from flask_socketio import SocketIO, emit
import datetime
from flask_cors import CORS
import requests

app = Flask(__name__)
socketio = SocketIO(app, cors_allowed_origins='*')

@app.route('/')
def index():
return 'Welcome to your Flask-SocketIO server!'

@socketio.on('connect')
def handle_connect():
// code here

// other handlers

@socketio.on('disconnect')
def handle_disconnect():
// code



if __name__ == '__main__':
socketio.run(app, debug=True, port=os.getenv("PORT", default=5000))
9 replies
RRailway
Created by YoussefZayed on 12/14/2023 in #✋|help
flask socket Io deploy fails
8a2a5193-1ab5-4672-b54e-52bd5b2545b9
9 replies