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
You can then use app.route_dynamic(route) instead of CROW_ROUTE(app, route). Which worked for me.
I should still mention that I'm not aware of what consequences this can have. And that it isn't advised to change routes after app.run() is called..
Edit: I should also mention that Crow absolutely moves the value of the rule variable, meaning you most likely won't be able to access the variable once the route is declared.
I'll look further into this when I have time. I might end up trying an official implementation so that settings can be loaded from a config file (which was one of the goals @ipkn was trying to achieve)
The-EDev
changed the title
Can the routes by dynamic? (no crow::black_magic::const_str)
Can the routes be dynamic? (no crow::black_magic::const_str)
Jul 6, 2021
While I do believe settings coming from a config file would be a good addition, I'm not sure if routes should be a part of that. So I'll close this issue.
I'm looking to make my routes configurable- probably loaded from a file.
Is there a way to make the following work?
The text was updated successfully, but these errors were encountered: