Open HelgeGehring opened 1 week ago
You have several paths to handle it.
Thanks for the quick reply!
I'll have a look at 1!
would there be a reason to not just forward the parameters?
return aiohttp.web.HTTPFound(f"index.html?{request.query_string}")
already forwards it to the html-page such that i think it would be just a simple addition to the .js
file to forward it to /ws
?
Thanks!
trame.tools.serve
is not meant to be used in real production especially when VTK/ParaView is involved. If trame is used for doing dashboards then that runner could make sense. But either way, we are more on a process based separation than a async task based separation. So that url arg is already taking care at the launcher stage.
I'd like to load different files based on the query string
Modiefied part of https://github.com/Kitware/trame/blob/master/trame/tools/serve.py :
The first print prints the query, the second doesn't. I'd need the information in the second part to use it for initializing the app, right?
Describe the solution you'd like
In the
index-.....js
i findI'd guess if we would add there the query string, it should be forwarded such the second print would also print it?
Describe alternatives you've considered
What I do right now as a workaround:
Does more or less the job, but it's for sure not a solution