% path = String.normalize_path(request.path) path = '/' if path.empty? view_path = path == '/' ? 'index.html' : "#{path}.html" %>
If you want back-end code to execute for this request, create a route in app/lib/routes.rb
:
get '<%=path%>' do
# your code goes here
end
But, we recommend you start by creating a view at app/views/<%=view_path%>
.
The view will be served up automatically without writing any back-end code! This pattern
is called view-first development (you could also call it awesome).