Pondering on a solution for file based routing for .templ files #509
Unanswered
Huzaifa-MS
asked this question in
Q&A
Replies: 1 comment
-
For now thinking of using some reflect / runtime package apis and maybe putting a global struct that each templ file adds it's own path location and function or function name to. Next based on http url path the function will be called using relfection on that struct. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to think of a good solution that lets my webserver serve templ components by defaulting to using the .templ file stored in the corresponding url path on the server
Currently I do not see a good way to call the generated function in _templ.go file dynamically.
I can't see a way to dynamically do this. i.e. file based routing generating html if a .templ file exists in the path.
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions