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
In my codebase, we have many routes. One thing that I like about Fn is that I can put routes where ever it makes sense it me -- to compare to Rails, it's not all stuck in routes.rb.
So we have a main routing function routes in Site that says that all routes starting with "/admin" are routed through adminRoutes in Handle.Admin. Other routes are handled by userRoutes or apiRoutes or other routing functions, and not all of them have as straightforward signals as "starts with foo".
People who are new to the codebase find it confusing that they can't immediately find a handler by looking at the main routing function, and sometimes you have to go two or more functions deep to finally find the handler for a given request!
I think it would be neat if there was a tool of some sort (like Rails' rake routes) to see all the routes and handlers at once, or to construct a simple version of a request and ask "what would handle this?".
Would probably require some static analysis?
The text was updated successfully, but these errors were encountered:
In my codebase, we have many routes. One thing that I like about Fn is that I can put routes where ever it makes sense it me -- to compare to Rails, it's not all stuck in
routes.rb
.So we have a main routing function
routes
inSite
that says that all routes starting with "/admin" are routed throughadminRoutes
inHandle.Admin
. Other routes are handled byuserRoutes
orapiRoutes
or other routing functions, and not all of them have as straightforward signals as "starts with foo".People who are new to the codebase find it confusing that they can't immediately find a handler by looking at the main routing function, and sometimes you have to go two or more functions deep to finally find the handler for a given request!
I think it would be neat if there was a tool of some sort (like Rails'
rake routes
) to see all the routes and handlers at once, or to construct a simple version of a request and ask "what would handle this?".Would probably require some static analysis?
The text was updated successfully, but these errors were encountered: