diff options
Diffstat (limited to 'todo.go')
| -rw-r--r-- | todo.go | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -128,9 +128,13 @@ func routeInput(command string, input string) { case "init": app.InitializeRepo() case "web": - web := todolist.NewWebapp() - fmt.Println("Now serving todolist web.\nHead to http://localhost:7890 to see your todo list!") - open.Start("http://localhost:7890") - web.Run() + if err := app.Load(); err != nil { + os.Exit(1) + } else { + web := todolist.NewWebapp() + fmt.Println("Now serving todolist web.\nHead to http://localhost:7890 to see your todo list!") + open.Start("http://localhost:7890") + web.Run() + } } } |
