init go project
This commit is contained in:
commit
5dde43e409
85 changed files with 16720 additions and 0 deletions
19
internal/routes/routes.go
Normal file
19
internal/routes/routes.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue