首次提交

This commit is contained in:
qmqz
2025-01-02 10:08:03 +08:00
commit fd62ed3d98
16 changed files with 1143 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
abstract class WebServer {
static late WebServer _webServer;
static WebServer getInstance() {
return _webServer;
}
static void setInstance(WebServer server) {
_webServer = server;
}
void start(int port);
void stop();
void addHandler(handler);
}
enum HttpMethod {
GET,
POST,
PUT,
DELETE,
ALL,
WS,
;
}
class RequestMapping {
final HttpMethod method;
final String path;
const RequestMapping({this.method = HttpMethod.ALL, required this.path});
}