23 lines
521 B
Python
23 lines
521 B
Python
import os
|
|
import logging
|
|
|
|
from server.common import HandlerType, HTTPMethod
|
|
from server.urlhandler import Path
|
|
from testmodule import main as 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)
|
|
]
|