adding summarization and restructure project

This commit is contained in:
2025-01-09 23:36:12 +01:00
parent 706ebe25a0
commit 38d4f1ad38
28 changed files with 579 additions and 209 deletions

View File

@@ -0,0 +1,19 @@
package main
import (
"net/http"
)
func (app *App) routes() http.Handler {
mux := http.NewServeMux()
// dynamic routes
mux.HandleFunc("GET /", app.Index)
mux.HandleFunc("POST /up/search", app.UpSearch)
// serve files from the "static" directory
fs := http.FileServer(http.Dir("assets/static"))
mux.Handle("GET /static/", http.StripPrefix("/", fs))
return mux
}