diff options
| author | Jeff Carr <[email protected]> | 2024-01-12 12:26:05 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-12 12:26:05 -0600 |
| commit | f8ae1dee50c18b4d33036ed48c48d2111b35fe85 (patch) | |
| tree | ac032dbba4d2a8094a4f4ca9fbf1942521c28dd3 /main.go | |
| parent | a36fe665e9515529166f64aaec4c88af6dedace2 (diff) | |
almost completely working
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -20,6 +20,16 @@ func okHandler(w http.ResponseWriter, r *http.Request) { doGui(w, url, repourl) return } + if tmp == "/" { + findFile(w, "files/index.html") + return + } + if tmp == "/new" { + indexHeader(w) + indexBodyStart(w) + indexBodyEnd(w) + return + } if tmp == "/test" { findFile(w, "files/repo.html") return @@ -28,10 +38,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) { findFile(w, "files/skeleton.v2.css") return } - if tmp == "/gui" { - // doGui(w, "/gui/gui") - return - } fmt.Fprintln(w, "BAD", tmp) } @@ -68,6 +74,7 @@ func main() { */ readconfigfile() http.HandleFunc("/", okHandler) + https() err := http.ListenAndServe(":80", nil) if err != nil { log.Println("Error starting server:", err) |
