cn-py-serv/server/urlhandler.py
John Solntsev 7697b7463e Write log files to directory
Move index file to parent directory, remove template directory
2024-06-04 17:25:11 +03:00

18 lines
414 B
Python

import os
def path(path="/", _type="static-file", link="index.html", methods=("GET",)):
if _type == "static-file":
return {
path: (methods, _type, os.path.join(os.getcwd(), link))
}
elif _type == "redirect":
return {
path: (methods, _type, link)
}
elif _type == "function":
return {
path: (methods, _type, link)
}