Added go server to serve the content.

This commit is contained in:
Ralph Caraveo committed 2015-06-13 22:38:41 -07:00
1 parent d13b95842f
commit 0f58eb33a6
3 files changed
+28 -2

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
package main
import (
"log"
"net/http"
)
func main() {
http.Handle("/", http.FileServer(http.Dir(".")))
// 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))
}