John Solntsev
f7d2a675fb
Add - handle GET request - handle & send data of user defined functions - project logotype to log when start server :) Change - move set log level to config file - move Response class to file Fix - log message of small or long first request line Template - for URL redirection (http_addr -> new_http_addr)
7 lines
325 B
Python
7 lines
325 B
Python
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)}
|