//! This is the main executable file. //! Here we will add all cli interfaces //! to interact with the state of the application //! but also the actual running of the server / webapp. const std = @import("std"); const http = @import("http"); const api = @import("api"); const site = @import("site"); const wasm = @embedFile("wasm"); const routes: http.RouteSet = .init(&([_]http.handler.Interface{ http.handler.Static(.index, site.app.html, "text/html").interface(), http.handler.Static(.{"index.wasm"}, wasm, "application/wasm").interface(), http.handler.Static(.{"icon.png"}, @embedFile("favicon.png"), "image/png").interface(), }) ++ api.interfaces); pub fn main(init: std.process.Init) !void { try http.serve(init.gpa, routes, .{ .address = try .parseLiteral("0.0.0.0:8080"), }); }