Skip to content

Instantly share code, notes, and snippets.

View SuperZombi's full-sized avatar
😎
Working from home

Super Zombi SuperZombi

😎
Working from home
View GitHub Profile
@SuperZombi
SuperZombi / fast_server.py
Last active October 4, 2024 10:24
Flask fast server
import os
from flask import Flask, send_from_directory, redirect, abort
app = Flask(__name__)
@app.route('/')
@app.route('/<path:filepath>')
def data(filepath="index"):
p = os.path.join("data", filepath)
if os.path.exists(p):
if os.path.isfile(p):