diff options
| author | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-12 12:47:39 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus.morhtuuzh@proton.me> | 2024-11-12 12:47:39 +0100 |
| commit | 0831926787f5e5a1943380a56417fd5f2231030e (patch) | |
| tree | 4eeb05ced7a5d287324fa2e71ecabe939c0f768d | |
| parent | 580e6500a5ebdb5f9970b69c5c3902e4b49c099a (diff) | |
feat(cli): dev mode listening on port 8000
| -rw-r--r-- | main.go | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -16,11 +16,13 @@ var templates embed.FS var ( domain string configPath string + dev bool ) func init() { flag.StringVar(&domain, "domain", "", "domain to use") flag.StringVar(&configPath, "config", "", "config to use") + flag.BoolVar(&dev, "dev", false, "dev mode enabled") } func main() { @@ -63,5 +65,9 @@ func main() { http.Redirect(w, r, "/", http.StatusTemporaryRedirect) } - g.StartServer(":8000") + if dev { + g.StartServer(":8000") + } else { + g.StartServer(":80") + } } |
