feat(cli): dev mode listening on port 8000
This commit is contained in:
parent
580e6500a5
commit
0831926787
1 changed files with 7 additions and 1 deletions
6
main.go
6
main.go
|
@ -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)
|
||||
}
|
||||
|
||||
if dev {
|
||||
g.StartServer(":8000")
|
||||
} else {
|
||||
g.StartServer(":80")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue