Fixing build issues

This commit is contained in:
MichaelOultram 2015-07-28 21:56:07 +01:00
parent a0f8ee59a1
commit 5d68fc57b7
2 changed files with 4 additions and 4 deletions

View file

@ -173,5 +173,5 @@ const CURRENT_SONG_PLAYLIST_HTML = `
// URL of the server for connecting via a web address
const WEB_ADDRESS = `
Control mumbledj from a web browser: <a href="http://%s:9563/%s">http://%s:9563/%s</a>
`
Control mumbledj from a web browser: <a href="http://%s/%s">http://%s/%s</a>
`

4
web.go
View file

@ -19,12 +19,12 @@ var external_ip = ""
func Webserver() {
http.HandleFunc("/", homepage)
http.HandleFunc("/add", addSong)
http.ListenAndServe(":9563", nil)
http.ListenAndServe(":80", nil)
rand.Seed(time.Now().UnixNano())
}
func homepage(w http.ResponseWriter, r *http.Request) {
var uname = token_client[r.FormValue("token")]
var uname = token_client[r.URL.Path[1:]]
if uname == nil {
fmt.Fprintf(w, "Invalid Token")
} else {