Move y'all

This commit is contained in:
Your Name
2026-04-01 18:33:10 -03:00
parent 864cc2ed15
commit 6266bbb780
22 changed files with 0 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env python3
from flask import Flask, send_from_directory
import os
app = Flask(__name__)
directory = os.getcwd() # serve current directory
@app.route("/", defaults={"path": "index.html"})
@app.route("/<path:path>")
def serve_file(path):
# If file exists, serve it
if os.path.isfile(os.path.join(directory, path)):
return send_from_directory(directory, path)
else:
return f"File not found: {path}", 404
if __name__ == "__main__":
# debug=True enables auto-reload when this file changes
app.run(host="0.0.0.0", port=8000, debug=True)