You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being able to serve static files at the root ("/index.html") while still allowing other routes is not covered by the readme. None of the issues I've read cover this either. I'm posting a working solution here for those looking. Perhaps this can be added to the readme.
This solves the panic: '/api/' in new path '/api/' conflicts with existing wildcard '/*filepath' in existing prefix '/*filepath' error when using the recommended router.ServeFiles("/*filepath", http.Dir("./templates")) function.
The text was updated successfully, but these errors were encountered:
Being able to serve static files at the root ("/index.html") while still allowing other routes is not covered by the readme. None of the issues I've read cover this either. I'm posting a working solution here for those looking. Perhaps this can be added to the readme.
This solves the
panic: '/api/' in new path '/api/' conflicts with existing wildcard '/*filepath' in existing prefix '/*filepath'
error when using the recommendedrouter.ServeFiles("/*filepath", http.Dir("./templates"))
function.The text was updated successfully, but these errors were encountered: