aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2025-10-02 18:22:34 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2025-10-02 18:22:34 +0200
commit1168ac60d3a22c0d354f291fd657ad302df6ec05 (patch)
treefc492948f751db0a72ec4a5ea1231b35d78c5b66 /main.go
parentdfca0f5bbebfe11d9c5d8bf6584bd1bf80d62274 (diff)
feat(backend): use httplog
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 11ebbe7..e1c13bb 100644
--- a/main.go
+++ b/main.go
@@ -24,6 +24,7 @@ var (
configFile = "config.toml"
port = 8000
publicDir = "public"
+ dev = false
)
func init() {
@@ -49,12 +50,13 @@ func init() {
publicDir = v
}
flag.StringVar(&publicDir, "public", publicDir, "public directory")
+ flag.BoolVar(&dev, "dev", false, "development mode")
}
func main() {
flag.Parse()
- r := backend.NewRouter()
+ r := backend.NewRouter(dev)
backend.HandleHome(r)