summaryrefslogtreecommitdiff
path: root/src/edit/main.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-11-16 00:22:22 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-11-16 00:22:22 -0500
commit7083a4c4508d68d18dc0427a0f0f86df3f1009c7 (patch)
tree2cebf1efd85ee8cec60a13b26c37aa45f9452452 /src/edit/main.go
parentccb838c4f55adde5bb55298f635a74542fe8e515 (diff)
stuff
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))})