product:routes
Introduction
product:routes lists every HTTP route of your product with the feature that registers it. Use it to find which feature answers a URL. It needs a selected product (SPLENT_APP).
splent product:routes
my_first_app [dev] 4 feature(s) 16 route(s)
ROUTE METHOD FEATURE ENDPOINT
────────────────────────────────────────────────────────────────────────────────────────────
/ GET splent_feature_landing landing.index
/admin/shop GET splent_feature_shop shop.admin_index
/admin/shop/<int:item_id>/delete POST splent_feature_shop shop.admin_delete
/admin/shop/<int:item_id>/edit GET splent_feature_shop shop.admin_edit
/admin/shop/<int:item_id>/edit POST splent_feature_shop shop.admin_edit
/admin/shop/new GET splent_feature_shop shop.admin_new
/admin/shop/new POST splent_feature_shop shop.admin_new
/notes GET splent_feature_notes notes.index
/notes POST splent_feature_notes notes.index
/notes/<int:note_id>/delete POST splent_feature_notes notes.delete
/notes/<subfolder>/<path:filename> GET splent_feature_notes notes.assets
/reports/ GET splent_feature_reports reports.index
/shop GET splent_feature_shop shop.index
/shop/<slug> GET splent_feature_shop shop.detail
/shop/<subfolder>/<path:filename> GET splent_feature_shop shop.assets
/static/<path:filename> GET (flask) static
A feature with an assets/ folder also registers /<name>/<subfolder>/<path:filename> for its compiled assets. Flask’s own /static/ route shows as (flask).
Listing one feature’s routes
splent product:routes --feature notes
--feature takes the short name (notes) or the full one (splent_feature_notes). When nothing matches it prints No routes matched.
Grouping the routes by feature
splent product:routes --group
my_first_app [dev]
(flask) (1 routes)
GET /static/<path:filename>
splent_feature_notes (4 routes)
GET /notes
POST /notes
POST /notes/<int:note_id>/delete
GET /notes/<subfolder>/<path:filename>
Where it runs
The command builds your product’s app, in development unless SPLENT_ENV says otherwise, and reads which feature registered each blueprint from app.extensions['splent_blueprint_trace'].
It runs in the product’s web container, <product>_web, when that container is up and either you work on another product than the selected one (SPLENT_APP=<name> splent product:routes) or the features need a package the CLI’s image lacks. Otherwise it runs in the CLI’s container.
Reference
| Option | Description |
|---|---|
--feature NAME |
Only the routes of this feature |
--group |
Group the routes by feature, with counts |
See also
product:configshows the resolved configuration and where each value comes from.