Created
August 9, 2014 23:00
-
-
Save izzystardust/9935ced6cb93953bc24e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>HTML 5 Video Test</title> | |
</head> | |
<body> | |
<video src="http://localhost:8090/vid/test.mp4"></video> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "net/http" | |
func handler(w http.ResponseWriter, r *http.Request) { | |
vid := r.URL.Path[len("/vid/"):] | |
http.ServeFile(w, r, "vid/"+vid) | |
} | |
func main() { | |
http.HandleFunc("/vid/", handler) | |
http.ListenAndServe(":8090", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment