diff options
Diffstat (limited to '')
-rw-r--r-- | main.ha | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2,6 +2,7 @@ // SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> // Adapted from template by Willow Barraco <contact@willowbarraco.fr> +use fs; use getopt; use log; use net; @@ -21,6 +22,8 @@ const usage: [_]getopt::help = [ ('c', "config", "path to configuration file") ]; +let static_fs: nullable *fs::fs = null; + export fn main() void = { const cmd = getopt::parse(os::args, usage...); defer getopt::finish(&cmd); @@ -35,6 +38,8 @@ export fn main() void = { }; }; + static_fs = os::diropen("static")!; + const server = match (http::listen(ip_addr, port, net::tcp::reuseport, net::tcp::reuseaddr)) { case let this: *http::server => yield this; |