Created
August 11, 2015 20:35
-
-
Save danjac/3c8220f19bbf65ec2029 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
package main | |
import ( | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
) | |
func main() { | |
proxyURL, _ := url.Parse("http://localhost:8000") | |
http.Handle("/", httputil.NewSingleHostReverseProxy(proxyURL)) | |
http.Handle("/media/", http.StripPrefix("/media/", http.FileServer(http.Dir("./django_caf/media")))) | |
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./django_caf/static")))) | |
http.ListenAndServe(":9000", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment