diff options
author | bptato <nincsnevem662@gmail.com> | 2022-11-30 12:27:01 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-11-30 12:27:01 +0100 |
commit | 07a4109aa28578b471d8d90042c5cba6f12abb8c (patch) | |
tree | 63505eb18c5652d44f910c0b00da8b2a491a740c /src/main.nim | |
parent | 83734c32eb5833c7443602d8fa4a90ad8f317c8f (diff) | |
download | chawan-07a4109aa28578b471d8d90042c5cba6f12abb8c.tar.gz |
Support WWW_HOME, HTTP_HOME
Diffstat (limited to 'src/main.nim')
-rw-r--r-- | src/main.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.nim b/src/main.nim index fdec3081..7c5a9243 100644 --- a/src/main.nim +++ b/src/main.nim @@ -100,6 +100,13 @@ while i < params.len: pages.add(param) inc i +if pages.len == 0: + let http = getEnv("HTTP_HOME") + if http != "": pages.add(http) + else: + let www = getEnv("WWW_HOME") + if www != "": pages.add(www) + if pages.len == 0 and not conf.headless: if stdin.isatty: help(1) |