Example #1
0
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)
Example #2
0
def index():
	return static_file('index.html', root=rootPath, mimetype=mimeTypes['html'])