Got actual HTML stuff for blog & portfolio done

This commit is contained in:
Caleb Gardner
2024-08-01 05:16:07 -05:00
parent 91c122e212
commit 892c386027
4 changed files with 92 additions and 11 deletions
+3 -2
View File
@@ -26,6 +26,7 @@ var (
)
func main() {
addr := ":4223"
mongoURL := flag.String("mongo", "", "Enables MongoDB usage for Darkstorm backend.")
webRoot = flag.String("web-root", "", "Sets root directory of web server.")
flag.Parse()
@@ -43,7 +44,7 @@ func main() {
setupBackend(mux)
setupWebsite(mux)
serv := &http.Server{
Addr: ":4223",
Addr: addr,
Handler: mux,
}
err := serv.ListenAndServeTLS(filepath.Join(flag.Arg(0), "cert.pem"), filepath.Join(flag.Arg(0), "key.pem"))
@@ -107,5 +108,5 @@ func mainHandle(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, filepath.Join(*webRoot, spl[0], "index.html"))
return
}
blogHandle(w, r, path)
blogHandle(w, path)
}