14 lines
315 B
Go
14 lines
315 B
Go
package server
|
|
|
|
import (
|
|
"io/fs"
|
|
"net/http"
|
|
)
|
|
|
|
func setupFrontendRouter(interactiveFs, noscriptFs fs.FS) http.Handler {
|
|
router := http.NewServeMux()
|
|
router.Handle("/noscript/", http.StripPrefix("/noscript", http.FileServerFS(noscriptFs)))
|
|
router.Handle("/", http.FileServerFS(interactiveFs))
|
|
|
|
return router
|
|
}
|