aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
blob: bf1b09fe416f0cea751d8d2175e4083bc6dd8c10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//! 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 web = @import("web/root.zig");

const routes: http.RouteSet = .init(api.interfaces ++ web.interfaces);

pub fn main(init: std.process.Init) !void {
    try http.serve(
        init.gpa,
        routes,
        try .parseLiteral("0.0.0.0:8080"),
    );
}