cn-py-serv/server/urlhandler.py

8 lines
325 B
Python
Raw Normal View History

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