This commit is contained in:
Nova Cat 2024-12-06 18:04:14 -08:00
parent 238c4e8c92
commit f8bcbca7c7

View file

@ -21,16 +21,16 @@ from flask import Flask, send_file
app = Flask(__name__) app = Flask(__name__)
@app.route('/') @app.route('/')
def index(): def index_html():
return send_file("sweebot.html", mimetype='text/html') return send_file("sweebot.html", mimetype='text/html')
@app.route('/run.txt') @app.route('/run.txt')
def run(): def runs():
return str(run) return str(run)
@app.route('/block.txt') @app.route('/block.txt')
def block(): def blocks():
return str(block) return str(block)
@app.route('/script.js') @app.route('/script.js')
def script(): def script_js():
return send_file("script.js", mimetype='application/javascript') return send_file("script.js", mimetype='application/javascript')
threading.Thread(target=app.run, daemon=True, kwargs={"port": 2005}).start() threading.Thread(target=app.run, daemon=True, kwargs={"port": 2005}).start()