Delete main.zig

main
flopetautschnig 1 year ago committed by GitHub
parent c93190b29a
commit 1bf1b8c493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,19 +0,0 @@
const std = @import("std");
const zrv = @import("zerve.zig");
const allocator = std.heap.page_allocator;
pub fn main() !void {
var rt = [_]zrv.Route{ .{ "/", index }, .{ "/about/", about } };
try zrv.Server.listen("0.0.0.0", 8080, &rt, allocator);
}
fn index(req: zrv.Request) zrv.Response {
_ = req;
return zrv.Response.new("hello!");
}
fn about(req: zrv.Request) zrv.Response {
_ = req;
return zrv.Response.new("about site");
}
Loading…
Cancel
Save