diff options
Diffstat (limited to 'cmd/forge/main.go')
-rw-r--r-- | cmd/forge/main.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cmd/forge/main.go b/cmd/forge/main.go new file mode 100644 index 0000000..102f4da --- /dev/null +++ b/cmd/forge/main.go @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org> + +package main + +import ( + "flag" + "log/slog" + "os" + + "go.lindenii.runxiyu.org/forge" +) + +func main() { + configPath := flag.String( + "config", + "/etc/lindenii/forge.scfg", + "path to configuration file", + ) + flag.Parse() + + s := forge.Server{} + + s.Setup() + + if err := s.LoadConfig(*configPath); err != nil { + slog.Error("loading configuration", "error", err) + os.Exit(1) + } + + s.Run() +} |