How can one do routing in Yaws? Like routing in ASP.NET MVC or Rails.
Of-course Erlang is a functional language without notions from oo world; but one could rout http://[domain].[com]/controller/action/arg1/arg2/ as a GET request to a module named 'controller' with an 'action/2' function (or is there already such a lib).
Yaws provides a few ways of doing this:
appmod
on the path "/" as shown in this answer, but as the question there hints, this approach doesn't allow you to get rid of the ".yaws" suffixes on your URLs..yaws
pages, so use it only if you really really know what you're doing.Of these 3 choices, I believe the rewrite module is the best one for this particular problem.