Delete main.zig
This commit is contained in:
parent
c93190b29a
commit
1bf1b8c493
1 changed files with 0 additions and 19 deletions
19
src/main.zig
19
src/main.zig
|
@ -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…
Add table
Reference in a new issue