2025-11-08 16:17:55 +01:00

26 lines
772 B
Go

package main
// This file is the one place in your application where all routes are listed.
import (
"crud/sqlite"
"io/fs"
"net/http"
)
// addRoutes combines the URL endpoints with the applications's services
// and dependencies and required middleware
func addRoutes(
mux *http.ServeMux,
database *sqlite.Database,
static fs.FS,
// templ *template.Template,
) {
mux.Handle("GET /", http.FileServer(http.FS(static)))
// mux.Handle("GET /tables", api.TableList(database))
// mux.Handle("GET /count", api.ProductCount(database))
// mux.Handle("GET /nutriments/{page}", api.DataNutriments(database, templ))
// mux.Handle("GET /products/{page}", api.DataProducts(database, templ))
// mux.Handle("GET /brandowner/{page}", api.DataBrandOwner(database, templ))
}