This commit is contained in:
csehviktor
2025-08-01 06:02:11 +02:00
parent 2f235fd402
commit bc2ff70893
2 changed files with 7 additions and 6 deletions

View File

@@ -6,7 +6,6 @@ import (
"github.com/csehviktor/pastebin/handler"
"github.com/csehviktor/pastebin/store"
"github.com/csehviktor/pastebin/view"
)
const addr = ":3000"
@@ -19,9 +18,7 @@ func main() {
mux.HandleFunc("GET /style.css", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "view/style.css")
})
mux.HandleFunc("GET /", func(w http.ResponseWriter, r *http.Request) {
handler.Render(view.BinEditorPage(), w, r)
})
mux.HandleFunc("GET /", httpHandler.HandleHome)
mux.HandleFunc("POST /", httpHandler.HandleSet)
mux.HandleFunc("GET /{id}", httpHandler.HandleGet)