summaryrefslogtreecommitdiff
path: root/src/edit/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit/main.go')
-rw-r--r--src/edit/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/edit/main.go b/src/edit/main.go
index 5995bea..3ddb2cd 100644
--- a/src/edit/main.go
+++ b/src/edit/main.go
@@ -14,10 +14,11 @@ func ServeIndex(out http.ResponseWriter, in *http.Request) {
http.Redirect(out, in, "/files/src/", http.StatusMovedPermanently)
}
+var WWW = GitDir("/srv/http/edit.team4272.com/www.git")
+
func main() {
socket, err := util.StreamListener(os.Args[1], os.Args[2])
errcheck(err)
- errcheck(os.Setenv("GIT_DIR", "/srv/http/edit.team4272.com/www.git"))
http.Handle("/", util.SaneHTTPHandler{http.HandlerFunc(ServeIndex)})
http.Handle("/static/", util.SaneHTTPHandler{http.StripPrefix("/static", http.FileServer(http.Dir("static")))})
http.Handle("/files/", util.SaneHTTPHandler{http.StripPrefix("/files", http.HandlerFunc(ServeGit))})