feat: add production build and health tooling

This commit is contained in:
OpenClaw Agent
2026-09-22 03:19:46 +08:00
parent de01ce2438
commit cd15e34961
8 changed files with 119 additions and 0 deletions
+8
View File
@@ -16,7 +16,10 @@ import (
"chfs-ng/internal/storage"
)
var version = "dev"
func main() {
showVersion := flag.Bool("version", false, "print version and exit")
file := flag.String("file", "", "configuration file")
pathFlag := flag.String("path", "/data", "shared path")
port := flag.Int("port", 80, "listen port")
@@ -24,6 +27,11 @@ func main() {
var rules multiFlag
flag.Var(&rules, "rule", "access rule (repeatable)")
flag.Parse()
if *showVersion {
println(version)
return
}
api.Version = version
cfg := config.Default()
if *file != "" {