Method of path module routing? #2004
-
Hey! Is there a way to group routes together on certain dynamic paths using Rocket? For example,
I know all these routes could be declared by themselves but it would be great to group by module or something. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@jackHedaya Totally with you on that. It would be amazing to have these parameters in that „base path“. What you currently could do:
|
Beta Was this translation helpful? Give feedback.
-
To accomplish this, I specify the base path when mounting routes -- you can concatenate several mount calls Example: main:
api module:
backend module:
$ curl localhost:8000/api/hello |
Beta Was this translation helpful? Give feedback.
@jackHedaya Totally with you on that. It would be amazing to have these parameters in that „base path“.
What you currently could do:
/client/
/<client>/signup
/<client>/signin
/<client>/forgot_password
/<client>/2fa
/business/
/<business>/say_hello
/<business>/say_world