1
0
Fork 0
forked from swee/MeowNex

Prepare for contribution #1

Merged
10kilo merged 30 commits from swee/MeowNex:main into main 2024-12-13 12:59:40 -08:00
Showing only changes of commit 63bbff3be8 - Show all commits

View file

@ -1,30 +0,0 @@
from flask import Flask
from flask import send_file
from flask import request
from flask import redirect
import os
from pathlib import Path
from time import sleep as wait
app = Flask(__name__)
@app.route('/')
def index():
return send_file("sweebot.html", mimetype='text/html')
@app.route('/run.txt')
def run():
wait(2)
return send_file(str(Path.home()) + "/run.txt", mimetype='text/html')
@app.route('/block.txt')
def block():
wait(2)
return send_file(str(Path.home()) + "/block.txt", mimetype='text/html')
@app.route('/script.js')
def script():
return send_file("script.js", mimetype='application/javascript')
if __name__ == '__main__':
# run() method of Flask class runs the application
# on the local development server.
app.run(host='0.0.0.0',port=2001)