Skip to content

Instantly share code, notes, and snippets.

@izzystardust
Created August 9, 2014 23:00
Show Gist options
  • Save izzystardust/9935ced6cb93953bc24e to your computer and use it in GitHub Desktop.
Save izzystardust/9935ced6cb93953bc24e to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<title>HTML 5 Video Test</title>
</head>
<body>
<video src="http://localhost:8090/vid/test.mp4"></video>
</body>
</html>
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