Add alpinejs to server

This commit is contained in:
Lucas Schumacher 2024-06-22 18:31:05 -04:00
parent fa1131c225
commit 2bcde24a2c

View File

@ -18,10 +18,14 @@ var react embed.FS
//go:embed "reactNextJS/out" //go:embed "reactNextJS/out"
var nextStatic embed.FS var nextStatic embed.FS
//go:embed "alpinejs"
var alpinejs embed.FS
func main() { func main() {
http.Handle("/vanillaJS/", http.FileServerFS(vanillaJS)) http.Handle("/vanillaJS/", http.FileServerFS(vanillaJS))
http.Handle("/react/", http.FileServerFS(react)) http.Handle("/react/", http.FileServerFS(react))
http.Handle("/alpinejs/", http.FileServerFS(alpinejs))
reactNextJS.AddNextStaticClient() reactNextJS.AddNextStaticClient()
err := http.ListenAndServe(fmt.Sprintf(":%d", PORT), nil) err := http.ListenAndServe(fmt.Sprintf(":%d", PORT), nil)