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
We would like to serve a directory (a la the directory handler-type) which is determined asynchronously. The current solution is to define a synchronous path config for the directory handler-type, but compute the path in a pre-handler. This creates some indirection that we don't see with the file handler-type due to the existence of h.file().
Do you have a new or modified API suggestion to solve the problem?
The recommendation coming from conversation in #154 is to introduce a new toolkit decoration h.directory() that can be called in a standard handler, with arbitrary logic preceding it within the handler. The input to h.directory() would mirror the input to the directory handler-type, analogously to h.file() and the file handler-type.
Support plan
Context
What problem are you trying to solve?
We would like to serve a directory (a la the
directoryhandler-type) which is determined asynchronously. The current solution is to define a synchronouspathconfig for thedirectoryhandler-type, but compute thepathin a pre-handler. This creates some indirection that we don't see with thefilehandler-type due to the existence ofh.file().Do you have a new or modified API suggestion to solve the problem?
The recommendation coming from conversation in #154 is to introduce a new toolkit decoration
h.directory()that can be called in a standard handler, with arbitrary logic preceding it within the handler. The input toh.directory()would mirror the input to thedirectoryhandler-type, analogously toh.file()and thefilehandler-type.