Update gitignore
This commit is contained in:
12
app.py
12
app.py
@ -1,12 +1,20 @@
|
||||
from flask import Flask, render_template
|
||||
from flask_socketio import SocketIO, emit
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
socketio = SocketIO(app)
|
||||
|
||||
|
||||
@app.route('/')
|
||||
def index():
|
||||
return render_template('index.html')
|
||||
|
||||
|
||||
@socketio.event
|
||||
def message(data):
|
||||
print(data)
|
||||
emit('message', data, broadcast=True)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
socketio.run(app)
|
||||
socketio.run(app, log_output=True)
|
||||
|
Reference in New Issue
Block a user