Print some info when running in dev mode

This commit is contained in:
Ken-Håvard Lieng 2017-06-07 00:17:46 +02:00
parent b6e92d6add
commit 1beb56abcf
2 changed files with 5 additions and 0 deletions

View File

@ -42,6 +42,9 @@ var rootCmd = &cobra.Command{
}, },
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
if viper.GetBool("dev") {
log.Println("Running in development mode, access client at http://localhost:3000")
}
log.Println("Storing data at", storage.Path.Root()) log.Println("Storing data at", storage.Path.Root())
storage.Open() storage.Open()

View File

@ -88,6 +88,8 @@ func startHTTP() {
} }
} else { } else {
if viper.GetBool("dev") { if viper.GetBool("dev") {
// The node dev server will proxy index page requests and
// websocket connections to this port
port = "1337" port = "1337"
} }
log.Println("[HTTP] Listening on port", port) log.Println("[HTTP] Listening on port", port)