mix phx.routes (Phoenix v1.6.0-rc.1) View Source
Prints all routes for the default or a given router.
$ mix phx.routes
$ mix phx.routes MyApp.AnotherRouter
The default router is inflected from the application
name unless a configuration named :namespace
is set inside your application configuration. For example,
the configuration:
config :my_app,
namespace: My.App
will exhibit the routes for My.App.Router
when this
task is invoked without arguments.
Umbrella projects do not have a default router and therefore always expect a router to be given. An alias can be added to mix.exs to automate this:
defp aliases do [
"phx.routes": "phx.routes MyAppWeb.Router",
...
]