CLI command to query routes #18

Open
opened 2026-03-23 17:53:33 +00:00 by tonymottaz · 0 comments
Owner

I want a command where I can pass in a method and pathname and receive details about the middleware handlers and route handler that would be hit. Something like this:

$ npx grackle match get /foo/bar/baz
matched handler:
    routes/foo/[id]/baz/+get.js

middleware:
    1. routes/+middleware.js
    2. routes/foo/[id]/baz/+middleware.js

available templates:
    - routes/foo/[id]/baz/+template.html.vto [Vento]      (text/html)
    - routes/foo/[id]/baz/+template.json.js  [JavaScript] (application/json)
I want a command where I can pass in a method and pathname and receive details about the middleware handlers and route handler that would be hit. Something like this: ``` $ npx grackle match get /foo/bar/baz matched handler: routes/foo/[id]/baz/+get.js middleware: 1. routes/+middleware.js 2. routes/foo/[id]/baz/+middleware.js available templates: - routes/foo/[id]/baz/+template.html.vto [Vento] (text/html) - routes/foo/[id]/baz/+template.json.js [JavaScript] (application/json) ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tonymottaz/grackle#18
No description provided.