Skip to content

Commit

Permalink
IOTWIFI_PORT to specify http port
Browse files Browse the repository at this point in the history
  • Loading branch information
cjimti committed Feb 15, 2018
1 parent c97eca1 commit e6c19e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func main() {
messages := make(chan iotwifi.CmdMessage, 1)

cfgUrl := setEnvIfEmpty("IOTWIFI_CFG", "cfg/wificfg.json")
port := setEnvIfEmpty("IOTWIFI_PORT", "8080")

go iotwifi.RunWifi(blog, messages, cfgUrl)
wpacfg := iotwifi.NewWpaCfg(blog, cfgUrl)
Expand Down Expand Up @@ -209,8 +210,8 @@ func main() {
http.Handle("/", r)

// serve http
blog.Info("HTTP Listening on 8080")
http.ListenAndServe(":8080", nil)
blog.Info("HTTP Listening on " + port)
http.ListenAndServe(":" + port, nil)

}

Expand Down

0 comments on commit e6c19e8

Please sign in to comment.