From 4d8cf47b88b36d3bbc4299c996ce9cf77bedea48 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Sat, 22 Sep 2012 19:05:51 +0200 Subject: Add a static file Handler to the root for previewing. --- src/ninjacloud.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ninjacloud.go b/src/ninjacloud.go index 5f9274e..5c6b417 100644 --- a/src/ninjacloud.go +++ b/src/ninjacloud.go @@ -681,6 +681,7 @@ func main() { http.HandleFunc(dirPath, dirHandler) http.HandleFunc(webPath, getDataHandler) http.HandleFunc(statusPath, getStatusHandler) + http.Handle("/", http.FileServer(http.Dir(projectsDir))) err = http.ListenAndServe(interfaceFlag+":"+portFlag, nil) if err != nil { -- cgit v1.2.3