DEV Community

Luis Gustavo Caciatori
Luis Gustavo Caciatori

Posted on

TIL - Phoenix Router 1.7 --Info trick

For Phoenix 1.7 you can pass an option --info for a path and the mix command will return to you the controller, action and file name with line for that router.

mix phx.routes --info http://localhost:4000/status
Enter fullscreen mode Exit fullscreen mode

results

$ mix phx.routes --info http://localhost:4000/status
Module: ExampleWeb.StatusController
Function: :status
/Users/lab/example/lib/example_web/controllers/status_controller.ex:7
Enter fullscreen mode Exit fullscreen mode

More info https://hexdocs.pm/phoenix/1.7.7/Mix.Tasks.Phx.Routes.html

Commit for this change on Phoenix repository
https://github.com/phoenixframework/phoenix/commits/v1.7.7/lib/mix/tasks/phx.routes.ex

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay