Open dmarx opened 7 years ago
Variable routes: https://plumber.trestletech.com/docs/routing/
Specifying what root folder is associated with a given route would be cool. On the one hand, I could just add a base_path
variable to the environment, or something like that (hmm... need to make sure this won't get overwritten). I think I can also specify what folders a plumber server has access to it: https://plumber.trestletech.com/docs/static/
Right now, the api is passing everything into the global environment via GET requests to the endpoint
/source_file
. Would be cool if we could dispatch to different environments. Maybe something like:I think this probably makes the most sense, but in reality the environment will probably have to be another query parameter rather than part of the endpoint.
Had to jump through quite a few hoops to figure out how to get stuff to run in the global environment: this might not be super easy. At least not with plumber... meh, who knows.
I'm pretty sure I tried something like this already, but I think the solution would be to, in the API script, grab the environment associated with the endpoint (or create it if it doesn't exist). There's probably a way to do this, although I recall having a lot of issues trying to do it this way.