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)
20 lines
325 B
Python
20 lines
325 B
Python
from logging import NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL
|
|
|
|
import testmod
|
|
|
|
from server.urlhandler import path
|
|
|
|
|
|
SETUP = {
|
|
"setup": {
|
|
"log_level": DEBUG
|
|
},
|
|
"server": {
|
|
"port": 8080,
|
|
}
|
|
}
|
|
|
|
urls = [
|
|
path("/", "static-file", "index.html"),
|
|
path("/func", "function", testmod.work)
|
|
]
|