2024-07-03 14:15:22 +03:00
|
|
|
import os
|
2024-07-03 14:06:19 +03:00
|
|
|
import logging
|
2024-02-25 01:42:17 +03:00
|
|
|
|
2024-09-15 15:11:51 +03:00
|
|
|
from server.common import HandlerType, HTTPMethod
|
|
|
|
from server.urlhandler import Path
|
2024-06-04 17:25:11 +03:00
|
|
|
import testmod
|
2024-02-25 01:42:17 +03:00
|
|
|
|
2024-09-15 15:11:51 +03:00
|
|
|
|
2023-12-29 02:13:10 +03:00
|
|
|
SETUP = {
|
2024-02-26 02:21:00 +03:00
|
|
|
"setup": {
|
2024-07-03 14:06:19 +03:00
|
|
|
"log_to_file": False,
|
|
|
|
"log_level": logging.DEBUG
|
2024-02-26 02:21:00 +03:00
|
|
|
},
|
2023-12-29 02:13:10 +03:00
|
|
|
"server": {
|
|
|
|
"port": 8080,
|
|
|
|
}
|
|
|
|
}
|
2024-02-25 01:42:17 +03:00
|
|
|
|
|
|
|
urls = [
|
2024-09-15 15:11:51 +03:00
|
|
|
Path("/", HandlerType.STATIC_FILE, "index.html"),
|
|
|
|
Path("/func", HandlerType.FUNCTION, testmod.work, HTTPMethod.GET|HTTPMethod.POST),
|
|
|
|
Path("/func1", HandlerType.FUNCTION, testmod.work2, HTTPMethod.POST)
|
2024-02-25 01:42:17 +03:00
|
|
|
]
|