aboutsummaryrefslogtreecommitdiffstats
path: root/todo.go
diff options
context:
space:
mode:
Diffstat (limited to 'todo.go')
-rw-r--r--todo.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/todo.go b/todo.go
index 74782ef..2b95c98 100644
--- a/todo.go
+++ b/todo.go
@@ -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()
+ }
}
}