aboutsummaryrefslogtreecommitdiffstats
path: root/todo.go
diff options
context:
space:
mode:
authorBunchhieng <Bunchhieng@gmail.com>2016-09-06 12:30:33 -0400
committerBunchhieng <Bunchhieng@gmail.com>2016-09-06 12:30:33 -0400
commit0d9372da1e781e54ce041b779ed159a89917e727 (patch)
tree8be1567f0754e35a3ab3d7f8323034f58ba1ca99 /todo.go
parent4c54e924259c28a1441aff4217e2d68a0cc1d1c5 (diff)
Open browser when starting the web app
Diffstat (limited to 'todo.go')
-rw-r--r--todo.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/todo.go b/todo.go
index 5d6bc75..022ecbf 100644
--- a/todo.go
+++ b/todo.go
@@ -6,6 +6,7 @@ import (
"strings"
"github.com/fatih/color"
+ "github.com/skratchdot/open-golang/open"
"github.com/gammons/todolist/todolist"
)
@@ -129,6 +130,7 @@ func routeInput(command string, input string) {
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()
}
}