def allStatic(path): fileType = "" for m in mimeTypes: fExt = ".%s"%m if path.find(fExt)!=-1: fileType = mimeTypes[m] break; # print(path) if fileType == "": print("some ERROR: %s"%path) return "404" if path.find("img")!=-1: rPath = assetPath else: rPath = rootPath return static_file(path, root=rPath, mimetype=fileType)
def index(): return static_file('index.html', root=rootPath, mimetype=mimeTypes['html'])