This commit is contained in:
lbenedar
2026-03-04 13:30:23 +03:00
parent 2e88f6f9d4
commit 00ac7cf707
6 changed files with 328 additions and 0 deletions

View File

@@ -7,9 +7,12 @@ import (
func main() {
mux := http.NewServeMux()
fileServer := http.FileServer(http.Dir("./ui/static/"))
mux.HandleFunc("/", home)
mux.HandleFunc("/snippet/view", snippetView)
mux.HandleFunc("/snippet/create", snippetCreate)
mux.Handle("/static/", http.StripPrefix("/static", fileServer))
log.Print("Starting server on :4000")
err := http.ListenAndServe(":4000", mux)