cn-py-serv/config.py
John Solntsev f7d2a675fb Add handle & send data of user defined functions
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)
2024-02-26 02:35:24 +03:00

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)
]