Skip to content

Commit

Permalink
fix: Make serve the default option
Browse files Browse the repository at this point in the history
  • Loading branch information
etu committed Apr 2, 2024
1 parent 6d70e54 commit 96fc068
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
cli := Cli{config: &config}

flag.StringVar(&configFile, "config", config.GuessFileName(""), "Specify config file")
flag.BoolVar(&serveFlag, "serve", false, "Run the serve command")
flag.BoolVar(&serveFlag, "serve", true, "Run the serve command (start the web server)")
flag.BoolVar(&listFlag, "list", false, "List the stored servers")
flag.StringVar(&addFlag, "add", "", "Add a new server, will capture the current directory and environment and then takes the command as an argument")
flag.StringVar(&removeFlag, "remove", "", "Remove an existing server by it's name")
Expand All @@ -32,9 +32,6 @@ func main() {
config.Read(configFile)

switch true {
case serveFlag:
serve.Run()

case listFlag:
cli.List()

Expand All @@ -52,5 +49,8 @@ func main() {

case len(logsFlag) > 0:
cli.Logs(logsFlag)

case serveFlag:
serve.Run()
}
}

0 comments on commit 96fc068

Please sign in to comment.