Updating comments and stuff.
This commit is contained in:
1 parent
0f58eb33a6
commit
1c9edb7dda
1 file changed
+2
-1
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user