aboutsummaryrefslogtreecommitdiff
path: root/main.ha
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-13 20:55:43 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-13 20:58:19 +0800
commita8823a83237291b903f85e7f8426cf5033314bbc (patch)
treefdfee2dbe770ed1bff27f2acb9b1b616e5e64f58 /main.ha
parentPartially port templates used by the index page (diff)
downloadforge-a8823a83237291b903f85e7f8426cf5033314bbc.tar.gz
forge-a8823a83237291b903f85e7f8426cf5033314bbc.tar.zst
forge-a8823a83237291b903f85e7f8426cf5033314bbc.zip
Accept --config not --address
Diffstat (limited to '')
-rw-r--r--main.ha13
1 files changed, 3 insertions, 10 deletions
diff --git a/main.ha b/main.ha
index 2df4db4..545e9bd 100644
--- a/main.ha
+++ b/main.ha
@@ -18,8 +18,8 @@ use bufio;
use strings;
const usage: [_]getopt::help = [
- "HTTP server",
- ('a', "address", "listened address")
+ "Lindenii Forge Server",
+ ('c', "config", "path to configuration file")
];
export fn main() void = {
@@ -31,14 +31,7 @@ export fn main() void = {
for (let opt .. cmd.opts) {
switch (opt.0) {
- case 'a' =>
- match (dial::splitaddr(opt.1, "")) {
- case let value: (str, u16) =>
- ip_addr = ip::parsev4(value.0)!;
- port = value.1;
- case dial::invalid_address =>
- abort("invalid address");
- };
+ case 'c' => yield; // TODO: actually handle the config
case => abort(); // unreachable
};
};