cn-py-serv/config.py
Иван Солнцев c9ed7835c1
Move log setup functional
... to main file.

Fix:
 - HTTP handler:
   - Rename function __write_func into http handler file;
   - Change close connection functions to self.__close().
2024-10-05 17:27:06 +03:00

23 lines
497 B
Python

import os
import logging
from server.common import HandlerType, HTTPMethod
from server.urlhandler import Path
import testmod
SETUP = {
"setup": {
"log_to_file": False,
"log_level": logging.DEBUG
},
"server": {
"port": 8080,
}
}
urls = [
Path("/", HandlerType.STATIC_FILE, "index.html"),
Path("/func", HandlerType.FUNCTION, testmod.work, HTTPMethod.GET|HTTPMethod.POST),
Path("/func1", HandlerType.FUNCTION, testmod.work2, HTTPMethod.POST)
]