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
{{ message }}
This repository has been archived by the owner on May 15, 2021. It is now read-only.
It will be much convenient to be able to prefix a recursive route instead to have to write the whole path for each endpoint:
// /server/routes/index.jsexportdefault({ fastify, self })=>{// Being able to register recursive routes s plugins for examplefastify.register(require("./v1"),{prefix: "/v1"});fastify.register(require("./v2"),{prefix: "/v2"});};
So the recursive routes can be written "relatively" not "absolutely"
// /server/routes/v1/index.jsexportdefault({ fastify, self })=>{fastify.get("/",self.name);// points to /api/v1/// Instead of this// fastify.get("/v1", self.name);// providing the whole path, which will become much longer with more folders recursively };
Hi @Liumkattan that'd be very nice indeed. This last PR of mine paves the way for implementing this by introducing getFastifyFacade(). I don't have the time to do it right now unfortunately, but welcome any attempts.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It will be much convenient to be able to prefix a recursive route instead to have to write the whole path for each endpoint:
So the recursive routes can be written "relatively" not "absolutely"
PS:
Thank you
The text was updated successfully, but these errors were encountered: