Assume: Project name = Mango
I have created a Registration Controller (:new,:create) and a CategoryController(:show)
from iex:
alias MangoWeb.Router.Helpers , as: Routes
alias MangoWeb.Endpoint
Routes.page_path(Endpoint,:index)
"/"
Routes.category_path(Endpoint,:show,17)
"/categories/17"
Routes.registration_path(Endpoint,:new)
"/register"
Routes.registration_path(Endpoint,:create)
"/register"
Routes.category_path(Endpoint,:show,"fruit")
"/categories/fruit"
Routes.page_url(Endpoint,:index)
"http://localhost:4000/"
Routes.category_url(Endpoint,:show,"fruit")
"http://localhost:4000/categories/fruit"
Routes.category_url(Endpoint,:show,"vegetables")
"http://localhost:4000/categories/vegetables"
Routes.registration_url(Endpoint,:new)
"http://localhost:4000/register"
Routes.registration_url(Endpoint,:create)
"http://localhost:4000/register"
etc.