From 1c9edb7ddaa88aa2d5f5b227ae94c9c18b701f82 Mon Sep 17 00:00:00 2001 From: Ralph Caraveo Date: Sat, 13 Jun 2015 22:42:51 -0700 Subject: [PATCH] Updating comments and stuff. --- html5/karaoke-server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html5/karaoke-server.go b/html5/karaoke-server.go index 7164663..c900f12 100644 --- a/html5/karaoke-server.go +++ b/html5/karaoke-server.go @@ -6,12 +6,13 @@ import ( ) func main() { + // 1.) This handler serves the root page html and .js content http.Handle("/", http.FileServer(http.Dir("."))) + // 2.) This handler serves only the karaoke content // To serve a directory on disk (/tmp) under an alternate URL // path (/tmpfiles/), use StripPrefix to modify the request // URL's path before the FileServer sees it: - // This handler serves only the karaoke content http.Handle("/karaoke/", http.StripPrefix("/karaoke/", http.FileServer(http.Dir("./karaoke/")))) log.Fatal(http.ListenAndServe(":8080", nil))