mirror of
https://github.com/jetzig-framework/jetzig.git
synced 2025-05-14 22:16:08 +00:00
20 lines
555 B
Zig
20 lines
555 B
Zig
const std = @import("std");
|
|
|
|
pub const jetzig = @import("jetzig.zig");
|
|
pub const templates = @import("app/views/zmpl.manifest.zig").templates;
|
|
pub const routes = @import("app/views/routes.zig").routes;
|
|
|
|
pub fn main() !void {
|
|
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
|
defer std.debug.assert(gpa.deinit() == .ok);
|
|
const allocator = gpa.allocator();
|
|
|
|
const app = try jetzig.init(allocator);
|
|
defer app.deinit();
|
|
|
|
try app.start(
|
|
comptime jetzig.route(routes),
|
|
comptime jetzig.loadTemplates(templates),
|
|
);
|
|
}
|