cn-py-serv/config.py

24 lines
521 B
Python
Raw Normal View History

2024-07-03 14:15:22 +03:00
import os
import logging
from server.common import HandlerType, HTTPMethod
from server.urlhandler import Path
2024-10-09 14:57:40 +03:00
from testmodule import main as testmod
2023-12-29 02:13:10 +03:00
SETUP = {
"setup": {
"log_to_file": False,
"log_level": logging.DEBUG
},
2023-12-29 02:13:10 +03:00
"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)
]