init go project

This commit is contained in:
juancwu 2025-10-10 08:14:33 -04:00
commit 5dde43e409
85 changed files with 16720 additions and 0 deletions

19
internal/routes/routes.go Normal file
View file

@ -0,0 +1,19 @@
package routes
import (
"io/fs"
"net/http"
"git.juancwu.dev/juancwu/budgething/assets"
"git.juancwu.dev/juancwu/budgething/internal/app"
)
func SetupRoutes(a *app.App) http.Handler {
mux := http.NewServeMux()
// Static
sub, _ := fs.Sub(assets.AssetsFS, ".")
mux.Handle("GET /assets/", http.StripPrefix("/assets/", http.FileServer(http.FS(sub))))
return mux
}