summaryrefslogtreecommitdiff
path: root/backend/src/Handler.zig
diff options
context:
space:
mode:
Diffstat (limited to 'backend/src/Handler.zig')
-rw-r--r--backend/src/Handler.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/backend/src/Handler.zig b/backend/src/Handler.zig
new file mode 100644
index 0000000..0cee922
--- /dev/null
+++ b/backend/src/Handler.zig
@@ -0,0 +1,9 @@
+const std = @import("std");
+const httpz = @import("httpz");
+
+pub const Handler = struct {
+ pub fn dispatch(self: *Handler, action: httpz.Action(*Handler), req: *httpz.Request, res: *httpz.Response) !void {
+ try action(self, req, res);
+ std.debug.print("{any} {s}\n", .{req.method, req.url.raw});
+ }
+};