Иван Солнцев
887e8da01b
Add - internal project file iterator function - path function to locate user files (first allocate as static-files) - primitive HTML page files for demonstrate server functional Change - Response class as iterator - code for send response to client
6 lines
277 B
Python
6 lines
277 B
Python
def path(path="/", _type="static-file", _file="index.html", methods=("GET",)):
|
|
if _type == "static-file":
|
|
return {path: (methods, _type, "static/{}".format(_file))}
|
|
|
|
elif _type == "template":
|
|
return {path: (methods, _type, "template/{}".format(_file))}
|